summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorclaucece <soficeli0@gmail.com>2015-09-18 17:33:05 -0500
committerclaucece <soficeli0@gmail.com>2015-10-05 22:39:30 -0500
commitf55fd33542c68fc8fc4519d622a41ef9517ebee3 (patch)
treece6b48fa4d6d01476fc5cc3ff42e33733ce26059 /app/models
parente4a012e09a6b16438bd1286b2057aed916a106f7 (diff)
added customers, recurring payment and payment_info
Diffstat (limited to 'app/models')
-rw-r--r--app/models/anonymous_user.rb5
-rw-r--r--app/models/user.rb10
2 files changed, 11 insertions, 4 deletions
diff --git a/app/models/anonymous_user.rb b/app/models/anonymous_user.rb
index 0c1f540..73e95e5 100644
--- a/app/models/anonymous_user.rb
+++ b/app/models/anonymous_user.rb
@@ -12,6 +12,10 @@ class AnonymousUser < Object
def id
nil
end
+
+ def has_payment_info?
+ false
+ end
def email
nil
@@ -32,4 +36,5 @@ class AnonymousUser < Object
def is_anonymous?
true
end
+
end
diff --git a/app/models/user.rb b/app/models/user.rb
index 52eabf2..391b2a5 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -9,6 +9,7 @@ class User < CouchRest::Model::Base
property :contact_email, String, :accessible => true
property :contact_email_key, String, :accessible => true
property :invite_code, String, :accessible => true
+ property :braintree_customer_id, Integer, :accessible => true
property :enabled, TrueClass, :default => true
# these will be null by default but we shouldn't ever pull them directly, but only via the methods that will return the full ServiceLevel
@@ -176,10 +177,11 @@ class User < CouchRest::Model::Base
@message.save if @message
end
-
- # def has_payment_info?
- # braintree_customer_id
- # end
+
+ def has_payment_info?
+ braintree_customer_id
+ end
+
protected
##