Class: EverboxClient::Account
- Inherits:
-
Object
- Object
- EverboxClient::Account
- Defined in:
- lib/everbox_client/models/account.rb
Instance Method Summary collapse
- #google? ⇒ Boolean
-
#initialize(data) ⇒ Account
constructor
A new instance of Account.
- #sdo? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(data) ⇒ Account
Returns a new instance of Account.
3 4 5 |
# File 'lib/everbox_client/models/account.rb', line 3 def initialize(data) @data = data end |
Instance Method Details
#google? ⇒ Boolean
7 8 9 |
# File 'lib/everbox_client/models/account.rb', line 7 def google? @data["type"] == 'google' end |
#sdo? ⇒ Boolean
11 12 13 |
# File 'lib/everbox_client/models/account.rb', line 11 def sdo? @data["type"] == 'sdo' end |
#to_s ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/everbox_client/models/account.rb', line 15 def to_s if google? "Google Account: #{@data["email"]}" elsif sdo? "SDO Account: #{@data["name"]}" else "Unknown Account Type: #{@data["type"]}" end end |