stripe 4.3.0 → 4.4.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.rb +1 -0
- data/lib/stripe/checkout_session.rb +9 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/checkout_session_test.rb +33 -0
- data/test/test_helper.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6de5937bd8a3dbcb24eff963fe7fc5c9eadb51277bd0fb9eb0da1e4d29ed7ae
|
4
|
+
data.tar.gz: f932fda4faabb39cc3ebea6486b7316a39f0a16a83fcacd4e3546d8cabff48a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8677c53d52d58d392a3b79329f3e7b582e3b89748a6dacee46befef16402777c31fc73ceef3538df62d02ed3d0f268032316519f58671ee1857b2b446daca32d
|
7
|
+
data.tar.gz: 5902050338e4224c82e70e14d0a84c3aa5be36f184f530646d1978c5afe2a1e4bb875b2d4a7610510a7e252644abc1a8eb919c03b85bae5191665155c8ab3d5a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.4.0
|
data/lib/stripe.rb
CHANGED
data/lib/stripe/util.rb
CHANGED
@@ -58,6 +58,7 @@ module Stripe
|
|
58
58
|
BitcoinTransaction::OBJECT_NAME => BitcoinTransaction,
|
59
59
|
Card::OBJECT_NAME => Card,
|
60
60
|
Charge::OBJECT_NAME => Charge,
|
61
|
+
CheckoutSession::OBJECT_NAME => CheckoutSession,
|
61
62
|
CountrySpec::OBJECT_NAME => CountrySpec,
|
62
63
|
Coupon::OBJECT_NAME => Coupon,
|
63
64
|
Customer::OBJECT_NAME => Customer,
|
data/lib/stripe/version.rb
CHANGED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require ::File.expand_path("../../test_helper", __FILE__)
|
4
|
+
|
5
|
+
module Stripe
|
6
|
+
class CheckoutSessionTest < Test::Unit::TestCase
|
7
|
+
should "be creatable" do
|
8
|
+
session = Stripe::CheckoutSession.create(
|
9
|
+
allowed_source_types: ["card"],
|
10
|
+
cancel_url: "https://stripe.com/cancel",
|
11
|
+
client_reference_id: "1234",
|
12
|
+
line_items: [
|
13
|
+
{
|
14
|
+
amount: 123,
|
15
|
+
currency: "usd",
|
16
|
+
description: "item 1",
|
17
|
+
images: [
|
18
|
+
"https://stripe.com/img1",
|
19
|
+
],
|
20
|
+
name: "name",
|
21
|
+
quantity: 2,
|
22
|
+
},
|
23
|
+
],
|
24
|
+
payment_intent_data: [
|
25
|
+
receipt_email: "test@stripe.com",
|
26
|
+
],
|
27
|
+
success_url: "https://stripe.com/success"
|
28
|
+
)
|
29
|
+
assert_requested :post, "#{Stripe.api_base}/v1/checkout_sessions"
|
30
|
+
assert session.is_a?(Stripe::CheckoutSession)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -16,7 +16,7 @@ PROJECT_ROOT = ::File.expand_path("../../", __FILE__)
|
|
16
16
|
require ::File.expand_path("../test_data", __FILE__)
|
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.40.0".freeze
|
20
20
|
MOCK_PORT = ENV["STRIPE_MOCK_PORT"] || 12_111
|
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: 4.
|
4
|
+
version: 4.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- lib/stripe/bitcoin_transaction.rb
|
84
84
|
- lib/stripe/card.rb
|
85
85
|
- lib/stripe/charge.rb
|
86
|
+
- lib/stripe/checkout_session.rb
|
86
87
|
- lib/stripe/country_spec.rb
|
87
88
|
- lib/stripe/coupon.rb
|
88
89
|
- lib/stripe/customer.rb
|
@@ -162,6 +163,7 @@ files:
|
|
162
163
|
- test/stripe/balance_test.rb
|
163
164
|
- test/stripe/bank_account_test.rb
|
164
165
|
- test/stripe/charge_test.rb
|
166
|
+
- test/stripe/checkout_session_test.rb
|
165
167
|
- test/stripe/country_spec_test.rb
|
166
168
|
- test/stripe/coupon_test.rb
|
167
169
|
- test/stripe/customer_card_test.rb
|
@@ -266,6 +268,7 @@ test_files:
|
|
266
268
|
- test/stripe/balance_test.rb
|
267
269
|
- test/stripe/bank_account_test.rb
|
268
270
|
- test/stripe/charge_test.rb
|
271
|
+
- test/stripe/checkout_session_test.rb
|
269
272
|
- test/stripe/country_spec_test.rb
|
270
273
|
- test/stripe/coupon_test.rb
|
271
274
|
- test/stripe/customer_card_test.rb
|