Class: SynapsePay::User
- Inherits:
-
APIResource
- Object
- APIResource
- SynapsePay::User
- Defined in:
- lib/synapse_pay/resources/user.rb
Instance Attribute Summary collapse
-
#accept_bank_payments ⇒ Object
Returns the value of attribute accept_bank_payments.
-
#accept_gratuity ⇒ Object
Returns the value of attribute accept_gratuity.
-
#avatar ⇒ Object
Returns the value of attribute avatar.
-
#balance ⇒ Object
Returns the value of attribute balance.
-
#email ⇒ Object
Returns the value of attribute email.
-
#fullname ⇒ Object
Returns the value of attribute fullname.
-
#has_avatar ⇒ Object
Returns the value of attribute has_avatar.
-
#is_trusted ⇒ Object
Returns the value of attribute is_trusted.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#promo_text ⇒ Object
Returns the value of attribute promo_text.
-
#referral_code ⇒ Object
Returns the value of attribute referral_code.
-
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
-
#seller_details ⇒ Object
Returns the value of attribute seller_details.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
-
#username ⇒ Object
Returns the value of attribute username.
-
#visit_count ⇒ Object
Returns the value of attribute visit_count.
-
#visit_message ⇒ Object
Returns the value of attribute visit_message.
Attributes inherited from APIResource
Class Method Summary collapse
- .create(params = {}, headers = {}) ⇒ Object
- .login(username, password, params = {}, headers = {}) ⇒ Object
- .refresh_access(refresh_token, params = {}, headers = {}) ⇒ Object
Instance Method Summary collapse
Methods inherited from APIResource
api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, #determine_api_attribute_value, determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json
Constructor Details
This class inherits a constructor from SynapsePay::APIResource
Instance Attribute Details
#accept_bank_payments ⇒ Object
Returns the value of attribute accept_bank_payments.
3 4 5 |
# File 'lib/synapse_pay/resources/user.rb', line 3 def accept_bank_payments @accept_bank_payments end |
#accept_gratuity ⇒ Object
Returns the value of attribute accept_gratuity.
4 5 6 |
# File 'lib/synapse_pay/resources/user.rb', line 4 def accept_gratuity @accept_gratuity end |
#avatar ⇒ Object
Returns the value of attribute avatar.
5 6 7 |
# File 'lib/synapse_pay/resources/user.rb', line 5 def avatar @avatar end |
#balance ⇒ Object
Returns the value of attribute balance.
6 7 8 |
# File 'lib/synapse_pay/resources/user.rb', line 6 def balance @balance end |
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/synapse_pay/resources/user.rb', line 7 def email @email end |
#fullname ⇒ Object
Returns the value of attribute fullname.
8 9 10 |
# File 'lib/synapse_pay/resources/user.rb', line 8 def fullname @fullname end |
#has_avatar ⇒ Object
Returns the value of attribute has_avatar.
9 10 11 |
# File 'lib/synapse_pay/resources/user.rb', line 9 def has_avatar @has_avatar end |
#is_trusted ⇒ Object
Returns the value of attribute is_trusted.
10 11 12 |
# File 'lib/synapse_pay/resources/user.rb', line 10 def is_trusted @is_trusted end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
11 12 13 |
# File 'lib/synapse_pay/resources/user.rb', line 11 def phone_number @phone_number end |
#promo_text ⇒ Object
Returns the value of attribute promo_text.
12 13 14 |
# File 'lib/synapse_pay/resources/user.rb', line 12 def promo_text @promo_text end |
#referral_code ⇒ Object
Returns the value of attribute referral_code.
13 14 15 |
# File 'lib/synapse_pay/resources/user.rb', line 13 def referral_code @referral_code end |
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
14 15 16 |
# File 'lib/synapse_pay/resources/user.rb', line 14 def resource_uri @resource_uri end |
#seller_details ⇒ Object
Returns the value of attribute seller_details.
15 16 17 |
# File 'lib/synapse_pay/resources/user.rb', line 15 def seller_details @seller_details end |
#user_id ⇒ Object
Returns the value of attribute user_id.
16 17 18 |
# File 'lib/synapse_pay/resources/user.rb', line 16 def user_id @user_id end |
#username ⇒ Object
Returns the value of attribute username.
17 18 19 |
# File 'lib/synapse_pay/resources/user.rb', line 17 def username @username end |
#visit_count ⇒ Object
Returns the value of attribute visit_count.
18 19 20 |
# File 'lib/synapse_pay/resources/user.rb', line 18 def visit_count @visit_count end |
#visit_message ⇒ Object
Returns the value of attribute visit_message.
19 20 21 |
# File 'lib/synapse_pay/resources/user.rb', line 19 def @visit_message end |
Class Method Details
.create(params = {}, headers = {}) ⇒ Object
21 22 23 24 25 |
# File 'lib/synapse_pay/resources/user.rb', line 21 def self.create(params={}, headers={}) method = APIMethod.new(:post, "/user/create", params, headers, self) json = method.execute Client.new().refresh_from(json) end |
.login(username, password, params = {}, headers = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/synapse_pay/resources/user.rb', line 27 def self.login(username, password, params={}, headers={}) params = ParamsBuilder.merge({ :username => username, :password => password, }, params) method = APIMethod.new(:post, "/user/login", params, headers, self) json = method.execute Client.new().refresh_from(json) end |
.refresh_access(refresh_token, params = {}, headers = {}) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/synapse_pay/resources/user.rb', line 37 def self.refresh_access(refresh_token, params={}, headers={}) params = ParamsBuilder.merge({ :refresh_token => refresh_token, }, params) method = APIMethod.new(:post, "/user/refresh", params, headers, self) json = method.execute Client.new().refresh_from(json) end |