stripe-ruby-mock 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  In your gemfile:
10
10
 
11
- gem 'stripe-ruby-mock', '~> 2.0.3', :require => 'stripe_mock'
11
+ gem 'stripe-ruby-mock', '~> 2.0.4', :require => 'stripe_mock'
12
12
 
13
13
  ## Features
14
14
 
@@ -25,7 +25,7 @@ module StripeMock
25
25
 
26
26
  private
27
27
 
28
- def self.redirect_to_mock_server(method, url, api_key, params={}, headers={})
28
+ def self.redirect_to_mock_server(method, url, api_key, params={}, headers={}, api_base_url=nil)
29
29
  handler = Instance.handler_for_method_url("#{method} #{url}")
30
30
  mock_error = client.error_queue.error_for_handler_name(handler[:name])
31
31
  if mock_error
@@ -22,7 +22,7 @@ module StripeMock
22
22
  },
23
23
  subscriptions: {
24
24
  object: "list",
25
- count: 0,
25
+ total_count: 0,
26
26
  url: "/v1/customers/#{cus_id}/subscriptions",
27
27
  data: []
28
28
  },
@@ -209,6 +209,7 @@ module StripeMock
209
209
  object: 'invoice',
210
210
  attempted: false,
211
211
  closed: false,
212
+ forgiven: false,
212
213
  paid: false,
213
214
  livemode: false,
214
215
  attempt_count: 0,
@@ -58,7 +58,7 @@ module StripeMock
58
58
  @base_strategy = TestStrategies::Base.new
59
59
  end
60
60
 
61
- def mock_request(method, url, api_key, params={}, headers={})
61
+ def mock_request(method, url, api_key, params={}, headers={}, api_base_url=nil)
62
62
  return {} if method == :xtest
63
63
 
64
64
  # Ensure params hash has symbols as keys
@@ -26,7 +26,7 @@ module StripeMock
26
26
  end
27
27
 
28
28
  def add_subscription_to_customer(cus, sub)
29
- cus[:subscriptions][:count] = (cus[:subscriptions][:count] || 0) + 1
29
+ cus[:subscriptions][:total_count] = (cus[:subscriptions][:total_count] || 0) + 1
30
30
  cus[:subscriptions][:data].unshift sub
31
31
  end
32
32
 
@@ -34,7 +34,7 @@ module StripeMock
34
34
  cus[:subscriptions][:data].reject!{|sub|
35
35
  sub[:id] == subscription[:id]
36
36
  }
37
- cus[:subscriptions][:count] -=1
37
+ cus[:subscriptions][:total_count] -=1
38
38
  end
39
39
 
40
40
  # `intervals` is set to 1 when calculating current_period_end from current_period_start & plan
@@ -1,4 +1,4 @@
1
1
  module StripeMock
2
2
  # stripe-ruby-mock version
3
- VERSION = "2.0.3"
3
+ VERSION = "2.0.4"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe-ruby-mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-12 00:00:00.000000000 Z
12
+ date: 2015-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: stripe