stripe 3.9.2 → 3.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop_todo.yml +1 -1
- data/.travis.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +1 -0
- data/lib/stripe/topup.rb +9 -0
- data/lib/stripe/util.rb +1 -0
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/product_test.rb +4 -2
- data/test/stripe/topup_test.rb +43 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2e7b5bea101451f3c7a05b79a5b7dbad7e02d2a7
|
4
|
+
data.tar.gz: efc7af8e83a025865095472b00130d9720ad5575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 826e1e1a0883d6a103da74ea2b3221ab55d786772e616038d05f2c7a38981ba45e2a9b14885358fef978cdf9aca0da8187f5c6da09d4c416e212e3c38c9b742f
|
7
|
+
data.tar.gz: 5a79ab66f87303e6ff5b06dc7999b6ede34ef2ee23126f47c318d25e37f51ba10551e09d3efe54d9811b5d8dfdc52d37c75b58024eb1d3c8979f8f85a8fe7371
|
data/.rubocop_todo.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.10.0
|
data/lib/stripe.rb
CHANGED
data/lib/stripe/topup.rb
ADDED
data/lib/stripe/util.rb
CHANGED
data/lib/stripe/version.rb
CHANGED
data/test/stripe/product_test.rb
CHANGED
@@ -16,10 +16,12 @@ module Stripe
|
|
16
16
|
end
|
17
17
|
|
18
18
|
should "be creatable" do
|
19
|
-
|
20
|
-
name: "My Product"
|
19
|
+
product = Stripe::Product.create(
|
20
|
+
name: "My Product",
|
21
|
+
type: "good"
|
21
22
|
)
|
22
23
|
assert_requested :post, "#{Stripe.api_base}/v1/products"
|
24
|
+
assert product.is_a?(Stripe::Product)
|
23
25
|
end
|
24
26
|
|
25
27
|
should "be saveable" do
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require File.expand_path("../../test_helper", __FILE__)
|
2
|
+
|
3
|
+
module Stripe
|
4
|
+
class TopupTest < Test::Unit::TestCase
|
5
|
+
should "be listable" do
|
6
|
+
topups = Stripe::Topup.list
|
7
|
+
assert_requested :get, "#{Stripe.api_base}/v1/topups"
|
8
|
+
assert topups.data.is_a?(Array)
|
9
|
+
assert topups.data[0].is_a?(Stripe::Topup)
|
10
|
+
end
|
11
|
+
|
12
|
+
should "be retrievable" do
|
13
|
+
topup = Stripe::Topup.retrieve("tu_123")
|
14
|
+
assert_requested :get, "#{Stripe.api_base}/v1/topups/tu_123"
|
15
|
+
assert topup.is_a?(Stripe::Topup)
|
16
|
+
end
|
17
|
+
|
18
|
+
should "be creatable" do
|
19
|
+
topup = Stripe::Topup.create(
|
20
|
+
amount: 100,
|
21
|
+
currency: "USD",
|
22
|
+
source: "src_123",
|
23
|
+
description: "description",
|
24
|
+
statement_descriptor: "statement descriptor"
|
25
|
+
)
|
26
|
+
assert_requested :post, "#{Stripe.api_base}/v1/topups"
|
27
|
+
assert topup.is_a?(Stripe::Topup)
|
28
|
+
end
|
29
|
+
|
30
|
+
should "be saveable" do
|
31
|
+
topup = Stripe::Topup.retrieve("tu_123")
|
32
|
+
topup.metadata["key"] = "value"
|
33
|
+
topup.save
|
34
|
+
assert_requested :post, "#{Stripe.api_base}/v1/topups/#{topup.id}"
|
35
|
+
end
|
36
|
+
|
37
|
+
should "be updateable" do
|
38
|
+
topup = Stripe::Topup.update("tu_123", metadata: { foo: "bar" })
|
39
|
+
assert_requested :post, "#{Stripe.api_base}/v1/topups/tu_123"
|
40
|
+
assert topup.is_a?(Stripe::Topup)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
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: 3.
|
4
|
+
version: 3.10.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-02-
|
11
|
+
date: 2018-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/stripe/subscription_item.rb
|
104
104
|
- lib/stripe/three_d_secure.rb
|
105
105
|
- lib/stripe/token.rb
|
106
|
+
- lib/stripe/topup.rb
|
106
107
|
- lib/stripe/transfer.rb
|
107
108
|
- lib/stripe/util.rb
|
108
109
|
- lib/stripe/version.rb
|
@@ -155,6 +156,7 @@ files:
|
|
155
156
|
- test/stripe/subscription_item_test.rb
|
156
157
|
- test/stripe/subscription_test.rb
|
157
158
|
- test/stripe/three_d_secure_test.rb
|
159
|
+
- test/stripe/topup_test.rb
|
158
160
|
- test/stripe/transfer_reversals_operations_test.rb
|
159
161
|
- test/stripe/transfer_test.rb
|
160
162
|
- test/stripe/util_test.rb
|
@@ -182,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
184
|
version: '0'
|
183
185
|
requirements: []
|
184
186
|
rubyforge_project:
|
185
|
-
rubygems_version: 2.
|
187
|
+
rubygems_version: 2.6.14
|
186
188
|
signing_key:
|
187
189
|
specification_version: 4
|
188
190
|
summary: Ruby bindings for the Stripe API
|
@@ -234,6 +236,7 @@ test_files:
|
|
234
236
|
- test/stripe/subscription_item_test.rb
|
235
237
|
- test/stripe/subscription_test.rb
|
236
238
|
- test/stripe/three_d_secure_test.rb
|
239
|
+
- test/stripe/topup_test.rb
|
237
240
|
- test/stripe/transfer_reversals_operations_test.rb
|
238
241
|
- test/stripe/transfer_test.rb
|
239
242
|
- test/stripe/util_test.rb
|