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 +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe/object_types.rb +1 -0
- data/lib/stripe/resources.rb +1 -0
- data/lib/stripe/resources/checkout/session.rb +3 -0
- data/lib/stripe/resources/line_item.rb +7 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/checkout/session_test.rb +12 -0
- data/test/test_helper.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f512dbfd8ec9e22989c36487ae9e342331d79e3a2d29a247faa5e683874f6751
|
4
|
+
data.tar.gz: 3ec2a701958afc3a5163bb980cb89608cf791df71d721394d21c8c05d25b8f86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1376b1aab1ba28a97ce42bc1411a50f48997f54143ba70778cea3ff94600b57a2c93a3064d4c403cffcd917059bc954c3399a31a0ccf2d61b616d7b9d4e7b1d7
|
7
|
+
data.tar.gz: 12104e8d2a4b2374fca5789980f55b728037213cce9e02c46a1bb3b296b0745e9c1dd9f875bda408b74288390c655d44df5ed7c87aa7fcb8d6eb98c571dcf140
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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.
|
1
|
+
5.22.0
|
data/lib/stripe/object_types.rb
CHANGED
@@ -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,
|
data/lib/stripe/resources.rb
CHANGED
@@ -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
|
data/lib/stripe/version.rb
CHANGED
@@ -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
|
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.
|
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.
|
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-
|
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
|