stripe 1.36.2 → 1.37.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 +2 -9
- data/Gemfile +18 -0
- data/History.txt +4 -0
- data/VERSION +1 -1
- data/lib/stripe.rb +2 -1
- data/lib/stripe/account.rb +6 -0
- data/lib/stripe/version.rb +1 -1
- data/stripe.gemspec +0 -13
- data/test/stripe/account_test.rb +16 -0
- metadata +1 -101
- data/gemfiles/default-with-activesupport.gemfile +0 -4
- data/gemfiles/yajl.gemfile +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5af575546f483b85a46fef6fbc1da6b579e3d02
|
4
|
+
data.tar.gz: 2a8e4a5d3e66143ecbcad1cc9be2201c04fa97b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6275388dfaab2973e5348419e74dfff51f877a7f4d2afe8c5833e899d01a4894589d9dd101c54bc895609759708c8017396a39595af67191578d4ebe4e1d7aad
|
7
|
+
data.tar.gz: 0cb84f50554816a08071e420fbde8735fe3ab5bb9772504c8992d259d59928c71324f8b73676c13d17a301e3fb16024876a3d08196fa329d9e8552b13c24906f
|
data/.travis.yml
CHANGED
@@ -5,16 +5,9 @@ rvm:
|
|
5
5
|
- 2.0.0
|
6
6
|
- 2.1
|
7
7
|
- 2.2
|
8
|
+
- 2.3.0
|
8
9
|
- jruby-19mode
|
9
|
-
|
10
|
-
gemfile:
|
11
|
-
- gemfiles/default-with-activesupport.gemfile
|
12
|
-
- gemfiles/yajl.gemfile
|
13
|
-
|
14
|
-
matrix:
|
15
|
-
exclude:
|
16
|
-
- rvm: jruby-19mode
|
17
|
-
gemfile: gemfiles/yajl.gemfile
|
10
|
+
- jruby-9.0.5.0
|
18
11
|
|
19
12
|
notifications:
|
20
13
|
email:
|
data/Gemfile
CHANGED
@@ -1,2 +1,20 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
|
+
|
2
3
|
gemspec
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
gem 'mocha', '~> 0.13.2'
|
7
|
+
gem 'pry'
|
8
|
+
gem 'rake'
|
9
|
+
gem 'shoulda', '~> 3.4.0'
|
10
|
+
gem 'test-unit'
|
11
|
+
|
12
|
+
platforms :mri do
|
13
|
+
# to avoid problems, bring Byebug in on just versions of Ruby under which
|
14
|
+
# it's known to work well
|
15
|
+
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0')
|
16
|
+
gem 'byebug'
|
17
|
+
gem 'pry-byebug'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.37.0
|
data/lib/stripe.rb
CHANGED
@@ -70,6 +70,7 @@ module Stripe
|
|
70
70
|
@connect_base = 'https://connect.stripe.com'
|
71
71
|
@uploads_base = 'https://uploads.stripe.com'
|
72
72
|
|
73
|
+
@max_network_retries = 0
|
73
74
|
@max_network_retry_delay = 2
|
74
75
|
@initial_network_retry_delay = 0.5
|
75
76
|
|
@@ -158,7 +159,7 @@ module Stripe
|
|
158
159
|
end
|
159
160
|
|
160
161
|
def self.max_network_retries
|
161
|
-
@max_network_retries
|
162
|
+
@max_network_retries
|
162
163
|
end
|
163
164
|
|
164
165
|
def self.max_network_retries=(val)
|
data/lib/stripe/account.rb
CHANGED
@@ -28,6 +28,12 @@ module Stripe
|
|
28
28
|
super(id, opts)
|
29
29
|
end
|
30
30
|
|
31
|
+
def reject(params={}, opts={})
|
32
|
+
opts = Util.normalize_opts(opts)
|
33
|
+
response, opts = request(:post, resource_url + '/reject', params, opts)
|
34
|
+
initialize_from(response, opts)
|
35
|
+
end
|
36
|
+
|
31
37
|
# Somewhat unfortunately, we attempt to do a special encoding trick when
|
32
38
|
# serializing `additional_owners` under an account: when updating a value,
|
33
39
|
# we actually send the update parameters up as an integer-indexed hash
|
data/lib/stripe/version.rb
CHANGED
data/stripe.gemspec
CHANGED
@@ -15,19 +15,6 @@ spec = Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_dependency('rest-client', '~> 1.4')
|
17
17
|
|
18
|
-
s.add_development_dependency('mocha', '~> 0.13.2')
|
19
|
-
s.add_development_dependency('shoulda', '~> 3.4.0')
|
20
|
-
s.add_development_dependency('test-unit')
|
21
|
-
s.add_development_dependency('rake')
|
22
|
-
|
23
|
-
# to avoid problems, bring Byebug in on just versions of Ruby under which
|
24
|
-
# it's known to work well
|
25
|
-
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.0.0')
|
26
|
-
s.add_development_dependency("byebug")
|
27
|
-
s.add_development_dependency("pry")
|
28
|
-
s.add_development_dependency("pry-byebug")
|
29
|
-
end
|
30
|
-
|
31
18
|
s.files = `git ls-files`.split("\n")
|
32
19
|
s.test_files = `git ls-files -- test/*`.split("\n")
|
33
20
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
data/test/stripe/account_test.rb
CHANGED
@@ -52,6 +52,22 @@ module Stripe
|
|
52
52
|
assert_equal 'secret-key', account.keys.secret
|
53
53
|
end
|
54
54
|
|
55
|
+
should "be rejectable" do
|
56
|
+
account_data = {:id => 'acct_foo'}
|
57
|
+
@mock.expects(:get).
|
58
|
+
once.
|
59
|
+
with('https://api.stripe.com/v1/accounts/acct_foo', nil, nil).
|
60
|
+
returns(make_response(account_data))
|
61
|
+
|
62
|
+
@mock.expects(:post).
|
63
|
+
once.
|
64
|
+
with("https://api.stripe.com/v1/accounts/acct_foo/reject", nil, 'reason=fraud').
|
65
|
+
returns(make_response(account_data))
|
66
|
+
|
67
|
+
account = Stripe::Account.retrieve('acct_foo')
|
68
|
+
account.reject(:reason => 'fraud')
|
69
|
+
end
|
70
|
+
|
55
71
|
should "be updatable" do
|
56
72
|
resp = {
|
57
73
|
:id => 'acct_foo',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ross Boucher
|
@@ -25,104 +25,6 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.4'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: mocha
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - "~>"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: 0.13.2
|
35
|
-
type: :development
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - "~>"
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: 0.13.2
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: shoulda
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - "~>"
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 3.4.0
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - "~>"
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: 3.4.0
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: test-unit
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: rake
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - ">="
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
80
|
-
requirements:
|
81
|
-
- - ">="
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '0'
|
84
|
-
- !ruby/object:Gem::Dependency
|
85
|
-
name: byebug
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
87
|
-
requirements:
|
88
|
-
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '0'
|
91
|
-
type: :development
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - ">="
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '0'
|
98
|
-
- !ruby/object:Gem::Dependency
|
99
|
-
name: pry
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
101
|
-
requirements:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - ">="
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '0'
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
name: pry-byebug
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
-
requirements:
|
116
|
-
- - ">="
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
requirements:
|
123
|
-
- - ">="
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: '0'
|
126
28
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
127
29
|
for details.
|
128
30
|
email:
|
@@ -143,8 +45,6 @@ files:
|
|
143
45
|
- Rakefile
|
144
46
|
- VERSION
|
145
47
|
- bin/stripe-console
|
146
|
-
- gemfiles/default-with-activesupport.gemfile
|
147
|
-
- gemfiles/yajl.gemfile
|
148
48
|
- lib/data/ca-certificates.crt
|
149
49
|
- lib/stripe.rb
|
150
50
|
- lib/stripe/account.rb
|