paid_up 0.13.6 → 0.13.7

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
  SHA256:
3
- metadata.gz: fd4aa53725c15d418c3798c8b7d8a4dea31e0ff1f114ca425d063b67896e75d2
4
- data.tar.gz: c10e4d754c584056c161f98a164a526c33047356b2b8f0120daa5fc8b29862e2
3
+ metadata.gz: 63ad3c5a57bc3f5b508efc2598c35ba8447216659ed0a1dfc81560210720d0b1
4
+ data.tar.gz: e4cba786f7fc1373ce47660a6435e12d0bd3296403e3622b29dc64cc3a4d0768
5
5
  SHA512:
6
- metadata.gz: 3bf0feabd9990f7f6259377138cd4a6f937a07c80feba530de59bcfac12d1113353de804e9b049d88620c68444883cf07287499aa6a17d9d619653437a13206e
7
- data.tar.gz: e2c416e17d6f7b9da15da8c00c088a9c8f96c7d6a5ea4d3a26ba716de16cd67ba2428623ad0b70008be648e0e1378538a29df6db959f4b50577c24344a899673
6
+ metadata.gz: 02edb6edf5ec11513a1fe4cd83459032c3f6c8f7d741e22e7720cbb91a131ffcca47bd8ffd750a170377b4b141c712cc5fae51af46406d682549864aaf5411c3
7
+ data.tar.gz: be3120210915e6206b0831f8f52da36e26d96dbcbf88e1afb2c70c8b6753b66b144fd01fd4ad464dcf3fe12f4b297ff9eee6fd5fc439ae7310cdce7f45d63531
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.13.6
1
+ 0.13.7
@@ -97,7 +97,7 @@ module PaidUp
97
97
 
98
98
  def set_default_attributes
99
99
  return unless new_record?
100
- self.stripe_id = PaidUp.configuration.anonymous_customer_stripe_id
100
+ self.stripe_id = working_stripe_id
101
101
  end
102
102
 
103
103
  def load_stripe_data
@@ -128,7 +128,9 @@ module PaidUp
128
128
  def remove_anonymous_association
129
129
  return unless stripe_id ==
130
130
  PaidUp.configuration.anonymous_customer_stripe_id
131
- self.stripe_id = nil
131
+
132
+ existing_customer = Stripe::Customer.list(email: email, limit: 1)&.first
133
+ self.stripe_id = existing_customer&.id
132
134
  end
133
135
  end
134
136
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: paid_up 0.13.6 ruby lib
5
+ # stub: paid_up 0.13.7 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "paid_up".freeze
9
- s.version = "0.13.6"
9
+ s.version = "0.13.7"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Karen Lundgren".freeze]
14
- s.date = "2018-09-09"
14
+ s.date = "2018-09-29"
15
15
  s.description = "Allows a model of your choosing (such as users) to subscribe to a plan, which enables features.".freeze
16
16
  s.email = "karen.e.lundgren@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.6
4
+ version: 0.13.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-09 00:00:00.000000000 Z
11
+ date: 2018-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml-rails