stripe 5.29.1 → 5.30.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: f2339577f165121c223f4295756bda5201da78e319999ade2af402d20d126ee2
4
- data.tar.gz: 8488a28668b139b205ce0d5f1352ae330fe8c5c9653c4028a9fa0302aed77711
3
+ metadata.gz: 35b4a8dbe95f87dd3e9c668af66d7a4254559109e4981b84f7b16dda44306ae7
4
+ data.tar.gz: 31eabe48b83cfa290878954d5deb22f7c0df3819f895b0331de21ae123c99410
5
5
  SHA512:
6
- metadata.gz: 16992739fced47381ac70ca4f4b8bd710a63633824c496fe1fdd8cb7cdf7928022a4c3aa4b84fe631ebb0e75a42aaa246d575c7ea7eaadfc15bf26631f031258
7
- data.tar.gz: b7ce68eae234665c2ded8c5e9691865bb6c98564cfe5f4928f94b660e42cc08eddfa375d4a9a790eb61e096ab679affdfd53e16c8a707dcf88c275e2ffaf2d5e
6
+ metadata.gz: 1fb166be37a738fab2bbbd0d04af4f09eee035e221ea2c33fe41b763ac8a3ed1f4162843e27aed561779cfe86e1c71b6f8efba7a906b12f3500b3cb36d3e1e11
7
+ data.tar.gz: e0edb450045a26287e48b98561dd9274a07e43a52e65a5b55bc7754879faa3358cea22cfd40cf9ce7164e8b1b8d5236fa9cad7c56bb16439a9a15a3a7474df88
data/.rubocop.yml CHANGED
@@ -27,6 +27,7 @@ Layout/HeredocIndentation:
27
27
 
28
28
  Layout/LineLength:
29
29
  Exclude:
30
+ - "lib/stripe/object_types.rb"
30
31
  - "lib/stripe/resources/**/*.rb"
31
32
  - "test/**/*.rb"
32
33
 
data/.travis.yml CHANGED
@@ -15,7 +15,7 @@ notifications:
15
15
  env:
16
16
  global:
17
17
  # If changing this number, please also change it in `test/test_helper.rb`.
18
- - STRIPE_MOCK_VERSION=0.101.0
18
+ - STRIPE_MOCK_VERSION=0.103.0
19
19
 
20
20
  cache:
21
21
  directories:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.30.0 - 2021-02-22
4
+ * [#965](https://github.com/stripe/stripe-ruby/pull/965) Add support for the Billing Portal Configuration API
5
+
3
6
  ## 5.29.1 - 2021-02-09
4
7
  * [#964](https://github.com/stripe/stripe-ruby/pull/964) Fix return value of `Customer#delete_discount`
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.29.1
1
+ 5.30.0
@@ -19,6 +19,7 @@ module Stripe
19
19
  Balance::OBJECT_NAME => Balance,
20
20
  BalanceTransaction::OBJECT_NAME => BalanceTransaction,
21
21
  BankAccount::OBJECT_NAME => BankAccount,
22
+ BillingPortal::Configuration::OBJECT_NAME => BillingPortal::Configuration,
22
23
  BillingPortal::Session::OBJECT_NAME => BillingPortal::Session,
23
24
  BitcoinReceiver::OBJECT_NAME => BitcoinReceiver,
24
25
  BitcoinTransaction::OBJECT_NAME => BitcoinTransaction,
@@ -9,6 +9,7 @@ require "stripe/resources/application_fee_refund"
9
9
  require "stripe/resources/balance"
10
10
  require "stripe/resources/balance_transaction"
11
11
  require "stripe/resources/bank_account"
12
+ require "stripe/resources/billing_portal/configuration"
12
13
  require "stripe/resources/billing_portal/session"
13
14
  require "stripe/resources/bitcoin_receiver"
14
15
  require "stripe/resources/bitcoin_transaction"
@@ -0,0 +1,14 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module BillingPortal
6
+ class Configuration < APIResource
7
+ extend Stripe::APIOperations::Create
8
+ extend Stripe::APIOperations::List
9
+ include Stripe::APIOperations::Save
10
+
11
+ OBJECT_NAME = "billing_portal.configuration"
12
+ end
13
+ end
14
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.29.1"
4
+ VERSION = "5.30.0"
5
5
  end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require ::File.expand_path("../../test_helper", __dir__)
4
+
5
+ module Stripe
6
+ module BillingPortal
7
+ class ConfigurationTest < Test::Unit::TestCase
8
+ should "be creatable" do
9
+ session = Stripe::BillingPortal::Configuration.create({
10
+ business_profile: {
11
+ privacy_policy_url: "https://example.com/privacy",
12
+ terms_of_service_url: "https://example.com/tos",
13
+ },
14
+ features: { customer_update: { allowed_updates: ["address"], enabled: true } },
15
+ })
16
+ assert_requested :post, "#{Stripe.api_base}/v1/billing_portal/configurations"
17
+ assert session.is_a?(Stripe::BillingPortal::Configuration)
18
+ end
19
+ should "be retrievable" do
20
+ session = Stripe::BillingPortal::Configuration.retrieve("bpc_xyz")
21
+ assert_requested :get, "#{Stripe.api_base}/v1/billing_portal/configurations/bpc_xyz"
22
+ assert session.is_a?(Stripe::BillingPortal::Configuration)
23
+ end
24
+
25
+ should "be updateable" do
26
+ session = Stripe::BillingPortal::Configuration.update("bpc_xyz", { active: false })
27
+ assert_requested :post, "#{Stripe.api_base}/v1/billing_portal/configurations/bpc_xyz"
28
+ assert session.is_a?(Stripe::BillingPortal::Configuration)
29
+ end
30
+ should "be listable" do
31
+ sessions = Stripe::BillingPortal::Configuration.list
32
+ assert_requested :get, "#{Stripe.api_base}/v1/billing_portal/configurations"
33
+ assert sessions.data[0].is_a?(Stripe::BillingPortal::Configuration)
34
+ end
35
+ end
36
+ end
37
+ end
data/test/test_helper.rb CHANGED
@@ -16,7 +16,7 @@ require ::File.expand_path("test_data", __dir__)
16
16
  require ::File.expand_path("stripe_mock", __dir__)
17
17
 
18
18
  # If changing this number, please also change it in `.travis.yml`.
19
- MOCK_MINIMUM_VERSION = "0.101.0"
19
+ MOCK_MINIMUM_VERSION = "0.103.0"
20
20
  MOCK_PORT = Stripe::StripeMock.start
21
21
 
22
22
  # Disable all real network connections except those that are outgoing to
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.29.1
4
+ version: 5.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-09 00:00:00.000000000 Z
11
+ date: 2021-02-22 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/balance.rb
65
65
  - lib/stripe/resources/balance_transaction.rb
66
66
  - lib/stripe/resources/bank_account.rb
67
+ - lib/stripe/resources/billing_portal/configuration.rb
67
68
  - lib/stripe/resources/billing_portal/session.rb
68
69
  - lib/stripe/resources/bitcoin_receiver.rb
69
70
  - lib/stripe/resources/bitcoin_transaction.rb
@@ -158,6 +159,7 @@ files:
158
159
  - test/stripe/balance_test.rb
159
160
  - test/stripe/balance_transaction_test.rb
160
161
  - test/stripe/bank_account_test.rb
162
+ - test/stripe/billing_portal/configuration_test.rb
161
163
  - test/stripe/billing_portal/session_test.rb
162
164
  - test/stripe/capability_test.rb
163
165
  - test/stripe/charge_test.rb
@@ -246,7 +248,7 @@ metadata:
246
248
  github_repo: ssh://github.com/stripe/stripe-ruby
247
249
  homepage_uri: https://stripe.com/docs/api/ruby
248
250
  source_code_uri: https://github.com/stripe/stripe-ruby
249
- post_install_message:
251
+ post_install_message:
250
252
  rdoc_options: []
251
253
  require_paths:
252
254
  - lib
@@ -262,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
264
  version: '0'
263
265
  requirements: []
264
266
  rubygems_version: 3.1.2
265
- signing_key:
267
+ signing_key:
266
268
  specification_version: 4
267
269
  summary: Ruby bindings for the Stripe API
268
270
  test_files:
@@ -278,6 +280,7 @@ test_files:
278
280
  - test/stripe/balance_test.rb
279
281
  - test/stripe/balance_transaction_test.rb
280
282
  - test/stripe/bank_account_test.rb
283
+ - test/stripe/billing_portal/configuration_test.rb
281
284
  - test/stripe/billing_portal/session_test.rb
282
285
  - test/stripe/capability_test.rb
283
286
  - test/stripe/charge_test.rb