stripe 6.2.0 → 6.3.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 +10 -7
- data/OPENAPI_VERSION +1 -1
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/stripe/resources/customer.rb +40 -3
- 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: fbc52fa0e9fcfaf1ffdb6427a94285ccf90daacfb9c212400dc3f25dd2bd3ce4
|
|
4
|
+
data.tar.gz: c3d8a2d531140836ee11a4aa80f7244226fe1c4cf106ef439820fe5bddb426c5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 575263394c5d6275016782f492ce1f7e334d003ad9479ef6016521800527006ef6c1a67fbe0e6e58afae64e32b35bc722290763b5d8b588d7263377f86925ef1
|
|
7
|
+
data.tar.gz: 044c6379ba0974f110e1a348a7eeeb0f0ada68fbbeb7ae6a4e8939c2f6597c7fb0a080aab7c58de77b33beecc2ffe551b90ed471c63544b74f9e0725389dfb71
|
data/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.3.0 - 2022-06-08
|
|
4
|
+
* [#1063](https://github.com/stripe/stripe-ruby/pull/1063) fix: Update cash balance methods to no longer require nested ID.
|
|
5
|
+
|
|
3
6
|
## 6.2.0 - 2022-05-23
|
|
4
7
|
* [#1060](https://github.com/stripe/stripe-ruby/pull/1060) API Updates
|
|
5
8
|
* Add support for new resource `Apps.Secret`
|
|
6
9
|
|
|
7
10
|
## 6.1.0 - 2022-05-19
|
|
8
11
|
* [#1057](https://github.com/stripe/stripe-ruby/pull/1057) API Updates
|
|
9
|
-
* Add support for new resources `Treasury.CreditReversal`, `Treasury.DebitReversal`, `Treasury.FinancialAccountFeatures`, `Treasury.FinancialAccount`, `Treasury.FlowDetails`, `Treasury.InboundTransfer`, `Treasury.OutboundPayment`, `Treasury.OutboundTransfer`, `Treasury.ReceivedCredit`, `Treasury.ReceivedDebit`, `Treasury.TransactionEntry`, and `Treasury.Transaction`
|
|
10
|
-
* Add support for `retrieve_payment_method` method on resource `Customer`
|
|
11
|
-
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* Add support for new resources `Treasury.CreditReversal`, `Treasury.DebitReversal`, `Treasury.FinancialAccountFeatures`, `Treasury.FinancialAccount`, `Treasury.FlowDetails`, `Treasury.InboundTransfer`, `Treasury.OutboundPayment`, `Treasury.OutboundTransfer`, `Treasury.ReceivedCredit`, `Treasury.ReceivedDebit`, `Treasury.TransactionEntry`, and `Treasury.Transaction`
|
|
13
|
+
* Add support for `retrieve_payment_method` method on resource `Customer`
|
|
14
|
+
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
|
15
|
+
|
|
16
|
+
|
|
14
17
|
|
|
15
18
|
## 6.0.0 - 2022-05-09
|
|
16
19
|
* [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
|
|
@@ -25,8 +28,8 @@
|
|
|
25
28
|
|
|
26
29
|
## 5.55.0 - 2022-05-05
|
|
27
30
|
* [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
|
|
28
|
-
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
|
29
|
-
|
|
31
|
+
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
|
32
|
+
|
|
30
33
|
|
|
31
34
|
## 5.54.0 - 2022-05-03
|
|
32
35
|
* [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
|
data/OPENAPI_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v152
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Stripe Ruby Library
|
|
2
2
|
|
|
3
3
|
[](https://badge.fury.io/rb/stripe)
|
|
4
|
-
[](https://github.com/stripe/stripe-ruby/actions?query=branch%3Amaster)
|
|
5
5
|
|
|
6
6
|
The Stripe Ruby library provides convenient access to the Stripe API from
|
|
7
7
|
applications written in the Ruby language. It includes a pre-defined set of
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.
|
|
1
|
+
6.3.0
|
|
@@ -15,9 +15,6 @@ module Stripe
|
|
|
15
15
|
custom_method :create_funding_instructions, http_verb: :post, http_path: "funding_instructions"
|
|
16
16
|
custom_method :list_payment_methods, http_verb: :get, http_path: "payment_methods"
|
|
17
17
|
|
|
18
|
-
nested_resource_class_methods :cash_balance,
|
|
19
|
-
operations: %i[retrieve update],
|
|
20
|
-
resource_plural: "cash_balance"
|
|
21
18
|
nested_resource_class_methods :balance_transaction,
|
|
22
19
|
operations: %i[create retrieve update list]
|
|
23
20
|
nested_resource_class_methods :tax_id,
|
|
@@ -94,5 +91,45 @@ module Stripe
|
|
|
94
91
|
def self.search_auto_paging_each(params = {}, opts = {}, &blk)
|
|
95
92
|
search(params, opts).auto_paging_each(&blk)
|
|
96
93
|
end
|
|
94
|
+
|
|
95
|
+
def self.retrieve_cash_balance(
|
|
96
|
+
customer,
|
|
97
|
+
opts_or_unused_nested_id = nil,
|
|
98
|
+
opts = {}
|
|
99
|
+
)
|
|
100
|
+
# Support two call patterns for backwards compatibility.
|
|
101
|
+
# 1. Legacy: (nil unused nested_id, opts)
|
|
102
|
+
# 2. Fixed pattern: (opts)
|
|
103
|
+
if !opts_or_unused_nested_id.nil? && opts_or_unused_nested_id.class == Hash && opts.empty?
|
|
104
|
+
opts = opts_or_unused_nested_id
|
|
105
|
+
end
|
|
106
|
+
resp, opts = execute_resource_request(
|
|
107
|
+
:get,
|
|
108
|
+
format("/v1/customers/%<customer>s/cash_balance", { customer: CGI.escape(customer) }),
|
|
109
|
+
{},
|
|
110
|
+
opts
|
|
111
|
+
)
|
|
112
|
+
Util.convert_to_stripe_object(resp.data, opts)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def self.update_cash_balance(
|
|
116
|
+
customer,
|
|
117
|
+
unused_nested_id = nil,
|
|
118
|
+
params = {},
|
|
119
|
+
opts = {}
|
|
120
|
+
)
|
|
121
|
+
# Do not allow passing in a hash as the second argument, as we require a nil for compatibility reasons. We cannot differentiate from a legacy pattern (nil, params) and a modern pattern (nil for params, opts).
|
|
122
|
+
if !unused_nested_id.nil? && unused_nested_id.class == Hash
|
|
123
|
+
raise ArgumentError, "update_cash_balance requires the second argument always be nil for legacy reasons."
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
resp, opts = execute_resource_request(
|
|
127
|
+
:post,
|
|
128
|
+
format("/v1/customers/%<customer>s/cash_balance", { customer: CGI.escape(customer) }),
|
|
129
|
+
params,
|
|
130
|
+
opts
|
|
131
|
+
)
|
|
132
|
+
Util.convert_to_stripe_object(resp.data, opts)
|
|
133
|
+
end
|
|
97
134
|
end
|
|
98
135
|
end
|
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: 6.
|
|
4
|
+
version: 6.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-06-08 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.
|