stripe 1.56.1 → 1.56.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/VERSION +1 -1
- data/lib/stripe/stripe_object.rb +1 -1
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/stripe_object_test.rb +33 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f3eceb5c2737ff2f2cfaab5341e90c960406cb5
|
4
|
+
data.tar.gz: 3f16e6ca7c70444e60c12eda3ef0bd620f6b8e60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb766287faa55616972a6bd6de845b059f9f255bb45a4347f3b8de4b16d35e1f1615882dd768d1f4236786227e375e156702e03219776b793a7f9b0adac50cd5
|
7
|
+
data.tar.gz: dd36f2bb9ff499e8b8308cd5a5a2afb32423d77e5415640f007ab989d01b6ad2dd0ea709dda167b8e1cf50f6b4e396c8e0d9671c39507ae16f7f7ded96256ee0
|
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.56.
|
1
|
+
1.56.2
|
data/lib/stripe/stripe_object.rb
CHANGED
data/lib/stripe/version.rb
CHANGED
@@ -96,7 +96,7 @@ module Stripe
|
|
96
96
|
obj.update_attributes(:foo => 'bar')
|
97
97
|
assert_equal true, obj.send(:metaclass).method_defined?(:foo)
|
98
98
|
end
|
99
|
-
|
99
|
+
|
100
100
|
should "warn that #refresh_from is deprecated" do
|
101
101
|
old_stderr = $stderr
|
102
102
|
$stderr = StringIO.new
|
@@ -292,6 +292,38 @@ module Stripe
|
|
292
292
|
assert_equal({ :id => 'id', :metadata => { :foo => 'bar' } }, serialized)
|
293
293
|
end
|
294
294
|
|
295
|
+
should "#to_s will call to_s for all embedded stripe objects" do
|
296
|
+
obj = Stripe::StripeObject.construct_from({
|
297
|
+
id: 'id',
|
298
|
+
#embeded list object
|
299
|
+
refunds: Stripe::ListObject.construct_from({ data: [
|
300
|
+
#embedded object in list
|
301
|
+
Stripe::StripeObject.construct_from({
|
302
|
+
id: 'id',
|
303
|
+
#embedded object in an object in a list object
|
304
|
+
metadata: Stripe::StripeObject.construct_from({
|
305
|
+
foo: 'bar',
|
306
|
+
})
|
307
|
+
})
|
308
|
+
]}),
|
309
|
+
# embeded stripe object
|
310
|
+
metadata: Stripe::StripeObject.construct_from({
|
311
|
+
foo: 'bar',
|
312
|
+
})
|
313
|
+
})
|
314
|
+
expected = JSON.pretty_generate({
|
315
|
+
id: 'id',
|
316
|
+
refunds: {
|
317
|
+
data: [
|
318
|
+
{id: 'id', metadata: {foo: 'bar'}}
|
319
|
+
]
|
320
|
+
},
|
321
|
+
metadata: { foo: 'bar' }
|
322
|
+
})
|
323
|
+
|
324
|
+
assert_equal(expected, obj.to_s)
|
325
|
+
end
|
326
|
+
|
295
327
|
should "warn that .serialize_params is deprecated" do
|
296
328
|
old_stderr = $stderr
|
297
329
|
$stderr = StringIO.new
|
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: 1.56.
|
4
|
+
version: 1.56.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|