stripe 5.50.0 → 5.54.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: fce0f5c23e8da3e798135433067340f179ef446af78e0369a08dce4bb4decbf6
4
- data.tar.gz: 4def88cada3eaa50f3ffa26cdbdfbd4e1046218f6a274ba4aa86ddc17ec77374
3
+ metadata.gz: b9d6ce176535bbef6a323f2005c49048ff277bb6c586dc4ac1fbe3d8872b0005
4
+ data.tar.gz: 2aa8f2749a5abecf6643c9f5518508724f576e2ad72455feb0efa3cced7bd259
5
5
  SHA512:
6
- metadata.gz: 56b9783c1e29d3d814362123bebdcf4bc4cc47f4a4c69f4c4fc5cf39c41e6c70e7c09280c4761ae350164efcdee11292e970695f81b2160fb1def046464b6586
7
- data.tar.gz: 3a36f7f199efd52d77de56a8d7c04be6318f4d994522036b3991e10c0f27f78f2c4c9d848e95b1411dd73fbcefe359beebc38f8a2159a060e7943a4ac952fa9d
6
+ metadata.gz: d551c722fc7caaaf263767ad5501b0d07c8c13af67bf607a109d3e69304c8baf910c15066d5860185d5841fc4be087f644045d573540acdad693caefd166c0a6
7
+ data.tar.gz: e48bf0b144136767e533d5be9ff804ab0d2b0c211ec4893be5aa2adfeebfb47f039584f92f9dc140c2b677e21f0e8238f258e596ac75714ed1be300ecd63c524
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.54.0 - 2022-05-03
4
+ * [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
5
+ * Add support for new resource `CashBalance`
6
+
7
+ ## 5.53.0 - 2022-04-21
8
+ * [#1050](https://github.com/stripe/stripe-ruby/pull/1050) API Updates
9
+ * Add support for `expire` test helper method on resource `Refund`
10
+
11
+ ## 5.52.0 - 2022-04-18
12
+ * [#1046](https://github.com/stripe/stripe-ruby/pull/1046) [#1047](https://github.com/stripe/stripe-ruby/pull/1047) API Updates
13
+ * Add support for new resources `FundingInstructions` and `Terminal.Configuration`
14
+
15
+ ## 5.51.0 - 2022-04-15
16
+ * [#1046](https://github.com/stripe/stripe-ruby/pull/1046) This release was incomplete and was yanked from RubyGems immediately after it was published.
17
+
3
18
  ## 5.50.0 - 2022-04-13
4
19
  * [#1045](https://github.com/stripe/stripe-ruby/pull/1045) API Updates
5
20
  * Add support for `increment_authorization` method on resource `PaymentIntent`
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.50.0
1
+ 5.54.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,7 @@ module Stripe
43
44
  File::OBJECT_NAME => File,
44
45
  File::OBJECT_NAME_ALT => File,
45
46
  FileLink::OBJECT_NAME => FileLink,
47
+ FundingInstructions::OBJECT_NAME => FundingInstructions,
46
48
  Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
47
49
  Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
48
50
  Invoice::OBJECT_NAME => Invoice,
@@ -92,6 +94,7 @@ module Stripe
92
94
  TaxCode::OBJECT_NAME => TaxCode,
93
95
  TaxId::OBJECT_NAME => TaxId,
94
96
  TaxRate::OBJECT_NAME => TaxRate,
97
+ Terminal::Configuration::OBJECT_NAME => Terminal::Configuration,
95
98
  Terminal::ConnectionToken::OBJECT_NAME => Terminal::ConnectionToken,
96
99
  Terminal::Location::OBJECT_NAME => Terminal::Location,
97
100
  Terminal::Reader::OBJECT_NAME => Terminal::Reader,
@@ -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
@@ -12,13 +12,26 @@ module Stripe
12
12
 
13
13
  OBJECT_NAME = "customer"
14
14
 
15
+ custom_method :create_funding_instructions, http_verb: :post, http_path: "funding_instructions"
15
16
  custom_method :list_payment_methods, http_verb: :get, http_path: "payment_methods"
16
17
 
18
+ nested_resource_class_methods :cash_balance,
19
+ operations: %i[retrieve update],
20
+ resource_plural: "cash_balance"
17
21
  nested_resource_class_methods :balance_transaction,
18
22
  operations: %i[create retrieve update list]
19
23
  nested_resource_class_methods :tax_id,
20
24
  operations: %i[create retrieve delete list]
21
25
 
26
+ def create_funding_instructions(params = {}, opts = {})
27
+ request_stripe_object(
28
+ method: :post,
29
+ path: resource_url + "/funding_instructions",
30
+ params: params,
31
+ opts: opts
32
+ )
33
+ end
34
+
22
35
  def list_payment_methods(params = {}, opts = {})
23
36
  request_stripe_object(
24
37
  method: :get,
@@ -0,0 +1,16 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ class FundingInstructions < APIResource
6
+ OBJECT_NAME = "funding_instructions"
7
+
8
+ def resource_url
9
+ if !respond_to?(:customer) || customer.nil?
10
+ raise NotImplementedError,
11
+ "FundingInstructions cannot be accessed without a customer ID."
12
+ end
13
+ "#{Customer.resource_url}/#{CGI.escape(customer)}/funding_instructions" "/#{CGI.escape(id)}"
14
+ end
15
+ end
16
+ end
@@ -19,5 +19,24 @@ module Stripe
19
19
  opts: opts
20
20
  )
21
21
  end
22
+
23
+ def test_helpers
24
+ TestHelpers.new(self)
25
+ end
26
+
27
+ class TestHelpers < APIResourceTestHelpers
28
+ RESOURCE_CLASS = Refund
29
+
30
+ custom_method :expire, http_verb: :post
31
+
32
+ def expire(params = {}, opts = {})
33
+ @resource.request_stripe_object(
34
+ method: :post,
35
+ path: resource_url + "/expire",
36
+ params: params,
37
+ opts: opts
38
+ )
39
+ end
40
+ end
22
41
  end
23
42
  end
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ class Configuration < APIResource
7
+ extend Stripe::APIOperations::Create
8
+ include Stripe::APIOperations::Delete
9
+ extend Stripe::APIOperations::List
10
+ include Stripe::APIOperations::Save
11
+
12
+ OBJECT_NAME = "terminal.configuration"
13
+ end
14
+ end
15
+ end
@@ -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,7 @@ 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/funding_instructions"
34
36
  require "stripe/resources/identity/verification_report"
35
37
  require "stripe/resources/identity/verification_session"
36
38
  require "stripe/resources/invoice"
@@ -80,6 +82,7 @@ require "stripe/resources/subscription_schedule"
80
82
  require "stripe/resources/tax_code"
81
83
  require "stripe/resources/tax_id"
82
84
  require "stripe/resources/tax_rate"
85
+ require "stripe/resources/terminal/configuration"
83
86
  require "stripe/resources/terminal/connection_token"
84
87
  require "stripe/resources/terminal/location"
85
88
  require "stripe/resources/terminal/reader"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.50.0"
4
+ VERSION = "5.54.0"
5
5
  end
data/lib/stripe.rb CHANGED
@@ -106,7 +106,7 @@ module Stripe
106
106
  # with API requests. Useful for plugin authors to identify their plugin when
107
107
  # communicating with Stripe.
108
108
  #
109
- # Takes a name and optional partner program ID, plugin URL, and version.
109
+ # Takes a name and optional partner program ID, plugin URL, and version.
110
110
  def self.set_app_info(name, partner_id: nil, url: nil, version: nil)
111
111
  @app_info = {
112
112
  name: name,
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.50.0
4
+ version: 5.54.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-13 00:00:00.000000000 Z
11
+ date: 2022-05-03 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,7 @@ 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/funding_instructions.rb
82
84
  - lib/stripe/resources/identity/verification_report.rb
83
85
  - lib/stripe/resources/identity/verification_session.rb
84
86
  - lib/stripe/resources/invoice.rb
@@ -128,6 +130,7 @@ files:
128
130
  - lib/stripe/resources/tax_code.rb
129
131
  - lib/stripe/resources/tax_id.rb
130
132
  - lib/stripe/resources/tax_rate.rb
133
+ - lib/stripe/resources/terminal/configuration.rb
131
134
  - lib/stripe/resources/terminal/connection_token.rb
132
135
  - lib/stripe/resources/terminal/location.rb
133
136
  - lib/stripe/resources/terminal/reader.rb
@@ -174,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
177
  - !ruby/object:Gem::Version
175
178
  version: '0'
176
179
  requirements: []
177
- rubygems_version: 3.1.2
180
+ rubygems_version: 3.3.7
178
181
  signing_key:
179
182
  specification_version: 4
180
183
  summary: Ruby bindings for the Stripe API