stripe 5.21.0 → 5.22.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: 9cdafae953d1c503aebdf2976b20a5c04dc01b61ac0b6bac2bd92993900b78f7
4
- data.tar.gz: 1c382fee9a657f61b3862b27f638a58b1ea4cd795d3fff0d0e057c15ec2c182a
3
+ metadata.gz: f512dbfd8ec9e22989c36487ae9e342331d79e3a2d29a247faa5e683874f6751
4
+ data.tar.gz: 3ec2a701958afc3a5163bb980cb89608cf791df71d721394d21c8c05d25b8f86
5
5
  SHA512:
6
- metadata.gz: 4bc22a8af3a1bae3156e536a7155533a4438814570e84aebbe318c1894b8775c9957e478df5d05c52d4627fabd0105b3c2a9036bda96282ffbac8cbb747b0ece
7
- data.tar.gz: 61804b56ab0d6dd379eab1f0c9fcb6841a771d59705f1ffc9cd1616ccab24575eb81baf95d1dde8a32d99d45848cc723a7ddc87b465b68a68cb6be1900ec87d3
6
+ metadata.gz: 1376b1aab1ba28a97ce42bc1411a50f48997f54143ba70778cea3ff94600b57a2c93a3064d4c403cffcd917059bc954c3399a31a0ccf2d61b616d7b9d4e7b1d7
7
+ data.tar.gz: 12104e8d2a4b2374fca5789980f55b728037213cce9e02c46a1bb3b296b0745e9c1dd9f875bda408b74288390c655d44df5ed7c87aa7fcb8d6eb98c571dcf140
@@ -17,7 +17,7 @@ sudo: false
17
17
  env:
18
18
  global:
19
19
  # If changing this number, please also change it in `test/test_helper.rb`.
20
- - STRIPE_MOCK_VERSION=0.89.0
20
+ - STRIPE_MOCK_VERSION=0.90.0
21
21
 
22
22
  cache:
23
23
  directories:
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.22.0 - 2020-05-11
4
+ * [#918](https://github.com/stripe/stripe-ruby/pull/918) Add support for the `LineItem` resource and APIs
5
+
3
6
  ## 5.21.0 - 2020-04-29
4
7
  * [#917](https://github.com/stripe/stripe-ruby/pull/917) Add support for the `Price` resource and APIs
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.21.0
1
+ 5.22.0
@@ -49,6 +49,7 @@ module Stripe
49
49
  Issuing::Cardholder::OBJECT_NAME => Issuing::Cardholder,
50
50
  Issuing::Dispute::OBJECT_NAME => Issuing::Dispute,
51
51
  Issuing::Transaction::OBJECT_NAME => Issuing::Transaction,
52
+ LineItem::OBJECT_NAME => LineItem,
52
53
  LoginLink::OBJECT_NAME => LoginLink,
53
54
  Mandate::OBJECT_NAME => Mandate,
54
55
  Order::OBJECT_NAME => Order,
@@ -38,6 +38,7 @@ require "stripe/resources/issuing/card_details"
38
38
  require "stripe/resources/issuing/cardholder"
39
39
  require "stripe/resources/issuing/dispute"
40
40
  require "stripe/resources/issuing/transaction"
41
+ require "stripe/resources/line_item"
41
42
  require "stripe/resources/login_link"
42
43
  require "stripe/resources/mandate"
43
44
  require "stripe/resources/order"
@@ -5,8 +5,11 @@ module Stripe
5
5
  class Session < APIResource
6
6
  extend Stripe::APIOperations::Create
7
7
  extend Stripe::APIOperations::List
8
+ extend Stripe::APIOperations::NestedResource
8
9
 
9
10
  OBJECT_NAME = "checkout.session"
11
+
12
+ nested_resource_class_methods :line_item, operations: %i[list]
10
13
  end
11
14
  end
12
15
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ class LineItem < APIResource
5
+ OBJECT_NAME = "item"
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.21.0"
4
+ VERSION = "5.22.0"
5
5
  end
@@ -36,6 +36,18 @@ module Stripe
36
36
  assert_requested :get, "#{Stripe.api_base}/v1/checkout/sessions/cs_123"
37
37
  assert charge.is_a?(Stripe::Checkout::Session)
38
38
  end
39
+
40
+ context "#list_line_items" do
41
+ should "list the session's line items" do
42
+ sources = Stripe::Checkout::Session.list_line_items(
43
+ "cs_123"
44
+ )
45
+ assert_requested :get, "#{Stripe.api_base}/v1/checkout/sessions/cs_123/line_items"
46
+ assert sources.is_a?(Stripe::ListObject)
47
+ assert sources.data.is_a?(Array)
48
+ assert sources.data[0].is_a?(Stripe::LineItem)
49
+ end
50
+ end
39
51
  end
40
52
  end
41
53
  end
@@ -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.89.0"
19
+ MOCK_MINIMUM_VERSION = "0.90.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.21.0
4
+ version: 5.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-29 00:00:00.000000000 Z
11
+ date: 2020-05-12 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.
@@ -93,6 +93,7 @@ files:
93
93
  - lib/stripe/resources/issuing/cardholder.rb
94
94
  - lib/stripe/resources/issuing/dispute.rb
95
95
  - lib/stripe/resources/issuing/transaction.rb
96
+ - lib/stripe/resources/line_item.rb
96
97
  - lib/stripe/resources/login_link.rb
97
98
  - lib/stripe/resources/mandate.rb
98
99
  - lib/stripe/resources/order.rb