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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13034f2ff5896fc11dd19069e36bb5d28c29e065
4
- data.tar.gz: 8a825283ac5be6e8d30415a111b149b67418892e
3
+ metadata.gz: e5af575546f483b85a46fef6fbc1da6b579e3d02
4
+ data.tar.gz: 2a8e4a5d3e66143ecbcad1cc9be2201c04fa97b0
5
5
  SHA512:
6
- metadata.gz: fe4c1d03c1f87740d45bf360227c7bb54305fefda51edf9d491520cfa697c04efc08a061367a77b0114a68eac63328fa48c7a94e08e4d09d699fe567abdbf71c
7
- data.tar.gz: 7209dab3a89095a82b94f454232fd9772d2b3523830b87fe52ecc774b2a5cf9cda23ebf0eddaaeaac0df1a0968ae70a3f31a2153d101d1b86e3436690fef9592
6
+ metadata.gz: 6275388dfaab2973e5348419e74dfff51f877a7f4d2afe8c5833e899d01a4894589d9dd101c54bc895609759708c8017396a39595af67191578d4ebe4e1d7aad
7
+ data.tar.gz: 0cb84f50554816a08071e420fbde8735fe3ab5bb9772504c8992d259d59928c71324f8b73676c13d17a301e3fb16024876a3d08196fa329d9e8552b13c24906f
@@ -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
@@ -1,3 +1,7 @@
1
+ === 1.37.0 2016-03-14
2
+
3
+ * Add `Account#reject` to support the new API feature
4
+
1
5
  === 1.36.2 2016-03-14
2
6
 
3
7
  * Fix reference to non-existent `#url` in `ListObject`
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.36.2
1
+ 1.37.0
@@ -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 || 0
162
+ @max_network_retries
162
163
  end
163
164
 
164
165
  def self.max_network_retries=(val)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '1.36.2'
2
+ VERSION = '1.37.0'
3
3
  end
@@ -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) }
@@ -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.36.2
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
@@ -1,4 +0,0 @@
1
- source "https://rubygems.org"
2
- gemspec :path => File.join(File.dirname(__FILE__), "..")
3
-
4
- gem 'activesupport'
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
- gemspec :path => File.join(File.dirname(__FILE__), "..")
3
-
4
- gem 'activesupport'
5
- gem 'yajl-ruby'