Class: Celery::User
Instance Attribute Summary collapse
-
#_id ⇒ Object
Returns the value of attribute _id.
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#affirm ⇒ Object
Returns the value of attribute affirm.
-
#analytics ⇒ Object
Returns the value of attribute analytics.
-
#business ⇒ Object
Returns the value of attribute business.
-
#confirmation_scripts ⇒ Object
Returns the value of attribute confirmation_scripts.
-
#confirmation_url ⇒ Object
Returns the value of attribute confirmation_url.
-
#created ⇒ Object
Returns the value of attribute created.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#email ⇒ Object
Returns the value of attribute email.
-
#emails ⇒ Object
Returns the value of attribute emails.
-
#facebook ⇒ Object
Returns the value of attribute facebook.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#has_affirm ⇒ Object
Returns the value of attribute has_affirm.
-
#has_paypalx ⇒ Object
Returns the value of attribute has_paypalx.
-
#id ⇒ Object
Returns the value of attribute id.
-
#message_to_buyer ⇒ Object
Returns the value of attribute message_to_buyer.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nexus ⇒ Object
Returns the value of attribute nexus.
-
#notifications ⇒ Object
Returns the value of attribute notifications.
-
#paypal_email ⇒ Object
Returns the value of attribute paypal_email.
-
#shipping_rates ⇒ Object
Returns the value of attribute shipping_rates.
-
#stripe ⇒ Object
Returns the value of attribute stripe.
-
#subscription ⇒ Object
Returns the value of attribute subscription.
-
#tax_rates ⇒ Object
Returns the value of attribute tax_rates.
-
#twitter ⇒ Object
Returns the value of attribute twitter.
-
#updated ⇒ Object
Returns the value of attribute updated.
-
#updated_date ⇒ Object
Returns the value of attribute updated_date.
-
#webhooks ⇒ Object
Returns the value of attribute webhooks.
-
#website ⇒ Object
Returns the value of attribute website.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Celery::Base
Instance Attribute Details
#_id ⇒ Object
Returns the value of attribute _id.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def _id @_id end |
#access_token ⇒ Object
Returns the value of attribute access_token.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def access_token @access_token end |
#affirm ⇒ Object
Returns the value of attribute affirm.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def affirm @affirm end |
#analytics ⇒ Object
Returns the value of attribute analytics.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def analytics @analytics end |
#business ⇒ Object
Returns the value of attribute business.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def business @business end |
#confirmation_scripts ⇒ Object
Returns the value of attribute confirmation_scripts.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def confirmation_scripts @confirmation_scripts end |
#confirmation_url ⇒ Object
Returns the value of attribute confirmation_url.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def confirmation_url @confirmation_url end |
#created ⇒ Object
Returns the value of attribute created.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def created @created end |
#created_date ⇒ Object
Returns the value of attribute created_date.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def created_date @created_date end |
#currency ⇒ Object
Returns the value of attribute currency.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def currency @currency end |
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def email @email end |
#emails ⇒ Object
Returns the value of attribute emails.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def emails @emails end |
#facebook ⇒ Object
Returns the value of attribute facebook.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def facebook @facebook end |
#flags ⇒ Object
Returns the value of attribute flags.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def flags @flags end |
#has_affirm ⇒ Object
Returns the value of attribute has_affirm.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def has_affirm @has_affirm end |
#has_paypalx ⇒ Object
Returns the value of attribute has_paypalx.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def has_paypalx @has_paypalx end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def id @id end |
#message_to_buyer ⇒ Object
Returns the value of attribute message_to_buyer.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def @message_to_buyer end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def name @name end |
#nexus ⇒ Object
Returns the value of attribute nexus.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def nexus @nexus end |
#notifications ⇒ Object
Returns the value of attribute notifications.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def notifications @notifications end |
#paypal_email ⇒ Object
Returns the value of attribute paypal_email.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def paypal_email @paypal_email end |
#shipping_rates ⇒ Object
Returns the value of attribute shipping_rates.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def shipping_rates @shipping_rates end |
#stripe ⇒ Object
Returns the value of attribute stripe.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def stripe @stripe end |
#subscription ⇒ Object
Returns the value of attribute subscription.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def subscription @subscription end |
#tax_rates ⇒ Object
Returns the value of attribute tax_rates.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def tax_rates @tax_rates end |
#twitter ⇒ Object
Returns the value of attribute twitter.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def twitter @twitter end |
#updated ⇒ Object
Returns the value of attribute updated.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def updated @updated end |
#updated_date ⇒ Object
Returns the value of attribute updated_date.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def updated_date @updated_date end |
#webhooks ⇒ Object
Returns the value of attribute webhooks.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def webhooks @webhooks end |
#website ⇒ Object
Returns the value of attribute website.
5 6 7 |
# File 'lib/celery/user.rb', line 5 def website @website end |
Class Method Details
Instance Method Details
#perform_request(attrs) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/celery/user.rb', line 19 def perform_request(attrs) HTTParty.put( Celery.endpoint + "users/me?" + Celery., body: attrs.to_json, headers: { 'Content-Type' => 'application/json' } ) end |
#update(attrs = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/celery/user.rb', line 12 def update(attrs={}) update_local_object(attrs) response = perform_request(attrs) return response['meta']['code'] == 200 ? true : false end |
#update_local_object(attrs) ⇒ Object
27 28 29 |
# File 'lib/celery/user.rb', line 27 def update_local_object(attrs) attrs.each { |key, value| self.send("#{key}=", value) } end |