spree_account_recurring 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,7 +18,7 @@ For older version of Spree
18
18
 
19
19
  ```ruby
20
20
  # Spree 2.1.x
21
- gem 'spree_account_recurring', '1.0.5'
21
+ gem 'spree_account_recurring', '1.0.6'
22
22
  ```
23
23
 
24
24
 
@@ -1,9 +1,13 @@
1
1
  Spree::User.class_eval do
2
2
  has_many :subscriptions
3
3
 
4
- def find_or_create_stripe_customer(token)
4
+ def find_or_create_stripe_customer(token=nil)
5
5
  return api_customer if stripe_customer_id?
6
- customer = Stripe::Customer.create(description: email, email: email, card: token)
6
+ customer = if token
7
+ Stripe::Customer.create(description: email, email: email, card: token)
8
+ else
9
+ Stripe::Customer.create(description: email, email: email)
10
+ end
7
11
  update_column(:stripe_customer_id, customer.id)
8
12
  customer
9
13
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_account_recurring
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 3
10
- version: 1.1.3
9
+ - 4
10
+ version: 1.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Priyank Gupta
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-07-02 00:00:00 Z
18
+ date: 2014-08-06 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: spree_core