stripe 5.53.0 → 6.0.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: 0a9e7f54ca7cf38cb46699a55f15b82c0973b77934d3f2e9eb94a5c5001a416b
4
- data.tar.gz: 6edcca1ef41890e6139fdc8c32df1e254f44892f873dd250f97bc26c70483c2f
3
+ metadata.gz: 56384c5d588a2d922c4cd813adfd6015bce5169cd334ae8dd6f45c16fcb07392
4
+ data.tar.gz: 5f9460024d8c4d1b7cd0ac44883d4aa9a3ed52e0104b129bdf0eacfff62e1698
5
5
  SHA512:
6
- metadata.gz: 490fda5c8549d53225ded73b6349d954baf902d8dce7bccf3cea34df58781f3a5cb312065acca49f6908ba8f130b358da0f32ff5245c65a28495ead622c2b1ee
7
- data.tar.gz: 4dbafc1d54fc90fdb003c77466cabb3c26fffd79d21e5f0774973a153ede061a9f4b1ece5999699e26f82cdf01628bd17e6acf25dff1f0bf5b9dc24433ee24f7
6
+ metadata.gz: 7b53fda899dfd3e44e27482860880228f93c3948425fef83c33ff106504cdae9441a3438488f80416946f653736389491cd5fc0c5e5e6d2ed604ffc50aa6a013
7
+ data.tar.gz: 602f93db8d61c5f7953e7f930eb7e74d09a0bc01fc02b32277cd6335a12cb93fa7f5c2767b111bac5c4d19a129fc1ed6749780cb8d1285d52e342f87523c47ee
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.0.0 - 2022-05-09
4
+ * [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
5
+ Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-Guide-for-v6) contains more information.
6
+
7
+ (⚠️ = breaking changes):
8
+ * ⚠️ Replace the legacy `Order` API with the new `Order` API.
9
+ * New methods: `cancel`, `list_line_items`, `reopen`, and `submit`
10
+ * Removed methods: `pay` and `return_order`
11
+ * Removed resources: `OrderItem` and `OrderReturn`
12
+ * ⚠️ Rename `FinancialConnections::Account.refresh` to `FinancialConnections::Account.refresh_account
13
+
14
+ ## 5.55.0 - 2022-05-05
15
+ * [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
16
+ * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
17
+
18
+
19
+ ## 5.54.0 - 2022-05-03
20
+ * [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
21
+ * Add support for new resource `CashBalance`
22
+
3
23
  ## 5.53.0 - 2022-04-21
4
24
  * [#1050](https://github.com/stripe/stripe-ruby/pull/1050) API Updates
5
25
  * Add support for `expire` test helper method on resource `Refund`
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.53.0
1
+ 6.0.0
@@ -27,6 +27,7 @@ module Stripe
27
27
  BitcoinTransaction::OBJECT_NAME => BitcoinTransaction,
28
28
  Capability::OBJECT_NAME => Capability,
29
29
  Card::OBJECT_NAME => Card,
30
+ CashBalance::OBJECT_NAME => CashBalance,
30
31
  Charge::OBJECT_NAME => Charge,
31
32
  Checkout::Session::OBJECT_NAME => Checkout::Session,
32
33
  CountrySpec::OBJECT_NAME => CountrySpec,
@@ -43,6 +44,11 @@ module Stripe
43
44
  File::OBJECT_NAME => File,
44
45
  File::OBJECT_NAME_ALT => File,
45
46
  FileLink::OBJECT_NAME => FileLink,
47
+ FinancialConnections::Account::OBJECT_NAME => FinancialConnections::Account,
48
+ FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
49
+ FinancialConnections::AccountOwnership::OBJECT_NAME =>
50
+ FinancialConnections::AccountOwnership,
51
+ FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
46
52
  FundingInstructions::OBJECT_NAME => FundingInstructions,
47
53
  Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
48
54
  Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
@@ -59,7 +65,6 @@ module Stripe
59
65
  LoginLink::OBJECT_NAME => LoginLink,
60
66
  Mandate::OBJECT_NAME => Mandate,
61
67
  Order::OBJECT_NAME => Order,
62
- OrderReturn::OBJECT_NAME => OrderReturn,
63
68
  PaymentIntent::OBJECT_NAME => PaymentIntent,
64
69
  PaymentLink::OBJECT_NAME => PaymentLink,
65
70
  PaymentMethod::OBJECT_NAME => PaymentMethod,
@@ -0,0 +1,22 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class CashBalance < APIResource
6
+ OBJECT_NAME = "cash_balance"
7
+
8
+ def resource_url
9
+ if !respond_to?(:customer) || customer.nil?
10
+ raise NotImplementedError,
11
+ "Customer Cash Balance cannot be accessed without a customer ID."
12
+ end
13
+ "#{Customer.resource_url}/#{CGI.escape(customer)}/cash_balance"
14
+ end
15
+
16
+ def self.retrieve(_id, _opts = {})
17
+ raise NotImplementedError,
18
+ "Customer Cash Balance cannot be retrieved without a customer ID. " \
19
+ "Retrieve a Customer Cash Balance using `Customer.retrieve_cash_balance('cus_123')`"
20
+ end
21
+ end
22
+ end
@@ -15,6 +15,9 @@ 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"
18
21
  nested_resource_class_methods :balance_transaction,
19
22
  operations: %i[create retrieve update list]
20
23
  nested_resource_class_methods :tax_id,
@@ -0,0 +1,31 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module FinancialConnections
6
+ class Account < APIResource
7
+ OBJECT_NAME = "financial_connections.account"
8
+
9
+ custom_method :disconnect, http_verb: :post
10
+ custom_method :refresh_account, http_verb: :post, http_path: "refresh"
11
+
12
+ def disconnect(params = {}, opts = {})
13
+ request_stripe_object(
14
+ method: :post,
15
+ path: resource_url + "/disconnect",
16
+ params: params,
17
+ opts: opts
18
+ )
19
+ end
20
+
21
+ def refresh_account(params = {}, opts = {})
22
+ request_stripe_object(
23
+ method: :post,
24
+ path: resource_url + "/refresh",
25
+ params: params,
26
+ opts: opts
27
+ )
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module FinancialConnections
6
+ class AccountOwner < StripeObject
7
+ OBJECT_NAME = "financial_connections.account_owner"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module FinancialConnections
6
+ class AccountOwnership < StripeObject
7
+ OBJECT_NAME = "financial_connections.account_ownership"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module FinancialConnections
6
+ class Session < APIResource
7
+ extend Stripe::APIOperations::Create
8
+
9
+ OBJECT_NAME = "financial_connections.session"
10
+ end
11
+ end
12
+ end
@@ -9,22 +9,42 @@ module Stripe
9
9
 
10
10
  OBJECT_NAME = "order"
11
11
 
12
- custom_method :pay, http_verb: :post
13
- custom_method :return_order, http_verb: :post, http_path: "returns"
12
+ custom_method :cancel, http_verb: :post
13
+ custom_method :list_line_items, http_verb: :get, http_path: "line_items"
14
+ custom_method :reopen, http_verb: :post
15
+ custom_method :submit, http_verb: :post
14
16
 
15
- def pay(params = {}, opts = {})
17
+ def cancel(params = {}, opts = {})
16
18
  request_stripe_object(
17
19
  method: :post,
18
- path: resource_url + "/pay",
20
+ path: resource_url + "/cancel",
19
21
  params: params,
20
22
  opts: opts
21
23
  )
22
24
  end
23
25
 
24
- def return_order(params = {}, opts = {})
26
+ def list_line_items(params = {}, opts = {})
27
+ request_stripe_object(
28
+ method: :get,
29
+ path: resource_url + "/line_items",
30
+ params: params,
31
+ opts: opts
32
+ )
33
+ end
34
+
35
+ def reopen(params = {}, opts = {})
36
+ request_stripe_object(
37
+ method: :post,
38
+ path: resource_url + "/reopen",
39
+ params: params,
40
+ opts: opts
41
+ )
42
+ end
43
+
44
+ def submit(params = {}, opts = {})
25
45
  request_stripe_object(
26
46
  method: :post,
27
- path: resource_url + "/returns",
47
+ path: resource_url + "/submit",
28
48
  params: params,
29
49
  opts: opts
30
50
  )
@@ -16,6 +16,7 @@ require "stripe/resources/bitcoin_receiver"
16
16
  require "stripe/resources/bitcoin_transaction"
17
17
  require "stripe/resources/capability"
18
18
  require "stripe/resources/card"
19
+ require "stripe/resources/cash_balance"
19
20
  require "stripe/resources/charge"
20
21
  require "stripe/resources/checkout/session"
21
22
  require "stripe/resources/country_spec"
@@ -31,6 +32,10 @@ require "stripe/resources/event"
31
32
  require "stripe/resources/exchange_rate"
32
33
  require "stripe/resources/file"
33
34
  require "stripe/resources/file_link"
35
+ require "stripe/resources/financial_connections/account"
36
+ require "stripe/resources/financial_connections/account_owner"
37
+ require "stripe/resources/financial_connections/account_ownership"
38
+ require "stripe/resources/financial_connections/session"
34
39
  require "stripe/resources/funding_instructions"
35
40
  require "stripe/resources/identity/verification_report"
36
41
  require "stripe/resources/identity/verification_session"
@@ -47,7 +52,6 @@ require "stripe/resources/line_item"
47
52
  require "stripe/resources/login_link"
48
53
  require "stripe/resources/mandate"
49
54
  require "stripe/resources/order"
50
- require "stripe/resources/order_return"
51
55
  require "stripe/resources/payment_intent"
52
56
  require "stripe/resources/payment_link"
53
57
  require "stripe/resources/payment_method"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.53.0"
4
+ VERSION = "6.0.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.53.0
4
+ version: 6.0.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-04-21 00:00:00.000000000 Z
11
+ date: 2022-05-09 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.
@@ -64,6 +64,7 @@ files:
64
64
  - lib/stripe/resources/bitcoin_transaction.rb
65
65
  - lib/stripe/resources/capability.rb
66
66
  - lib/stripe/resources/card.rb
67
+ - lib/stripe/resources/cash_balance.rb
67
68
  - lib/stripe/resources/charge.rb
68
69
  - lib/stripe/resources/checkout/session.rb
69
70
  - lib/stripe/resources/country_spec.rb
@@ -79,6 +80,10 @@ files:
79
80
  - lib/stripe/resources/exchange_rate.rb
80
81
  - lib/stripe/resources/file.rb
81
82
  - lib/stripe/resources/file_link.rb
83
+ - lib/stripe/resources/financial_connections/account.rb
84
+ - lib/stripe/resources/financial_connections/account_owner.rb
85
+ - lib/stripe/resources/financial_connections/account_ownership.rb
86
+ - lib/stripe/resources/financial_connections/session.rb
82
87
  - lib/stripe/resources/funding_instructions.rb
83
88
  - lib/stripe/resources/identity/verification_report.rb
84
89
  - lib/stripe/resources/identity/verification_session.rb
@@ -95,7 +100,6 @@ files:
95
100
  - lib/stripe/resources/login_link.rb
96
101
  - lib/stripe/resources/mandate.rb
97
102
  - lib/stripe/resources/order.rb
98
- - lib/stripe/resources/order_return.rb
99
103
  - lib/stripe/resources/payment_intent.rb
100
104
  - lib/stripe/resources/payment_link.rb
101
105
  - lib/stripe/resources/payment_method.rb
@@ -1,10 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- class OrderReturn < APIResource
6
- extend Stripe::APIOperations::List
7
-
8
- OBJECT_NAME = "order_return"
9
- end
10
- end