From f55fd33542c68fc8fc4519d622a41ef9517ebee3 Mon Sep 17 00:00:00 2001 From: claucece Date: Fri, 18 Sep 2015 17:33:05 -0500 Subject: added customers, recurring payment and payment_info --- app/models/anonymous_user.rb | 5 +++++ app/models/user.rb | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'app/models') 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 ## -- cgit v1.2.3