stripe 6.2.0 → 6.3.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: 4812cac66d5fbc87584349e386f67fb3b3597307486ecd2e019781e73489e5ae
4
- data.tar.gz: 53352fe3c35ae28df341bc360caa308684fec099c1595eb381fcf1c83302344f
3
+ metadata.gz: fbc52fa0e9fcfaf1ffdb6427a94285ccf90daacfb9c212400dc3f25dd2bd3ce4
4
+ data.tar.gz: c3d8a2d531140836ee11a4aa80f7244226fe1c4cf106ef439820fe5bddb426c5
5
5
  SHA512:
6
- metadata.gz: d39bb60d0a75ea8a9bcdad463d95b496d8f0c882b5b18f8dc7590468070ebb0e77e8b8bfef77f741d594a1ef57a89d92c8c4bb28caa834c040e1feaa353e9103
7
- data.tar.gz: 30088d515709b619d85698478b90663810cc14d065cce05d38221d5773d3d530a3a92eea1bfaad6f3cc7c99ff0029422d93dcbc2392f476aa84930b7c22168a9
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
- v146
1
+ v152
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Stripe Ruby Library
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/stripe.svg)](https://badge.fury.io/rb/stripe)
4
- [![Build Status](https://travis-ci.org/stripe/stripe-ruby.svg?branch=master)](https://travis-ci.org/stripe/stripe-ruby)
4
+ [![Build Status](https://github.com/stripe/stripe-ruby/actions/workflows/ci.yml/badge.svg?branch=master)](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.2.0
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "6.2.0"
4
+ VERSION = "6.3.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: 6.2.0
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-05-23 00:00:00.000000000 Z
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.