Class: Sorenson::ThreeSixty::AccountSummary
- Defined in:
- lib/sorenson/threesixty/account_summary.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#chosenRatePlan ⇒ Object
Attributes.
-
#id ⇒ Object
Attributes.
-
#lastLoginTime ⇒ Object
Attributes.
-
#ratePlanExpirationDate ⇒ Object
Attributes.
-
#status ⇒ Object
Attributes.
-
#username ⇒ Object
Attributes.
Class Method Summary collapse
-
.getAccountSummaries ⇒ Object
Class Methods.
Instance Method Summary collapse
-
#initialize(data) ⇒ AccountSummary
constructor
Instance Methods.
Methods inherited from Base
debug=, debug?, host, #post_to, post_to, protocol, token_for, use_ssl=, use_ssl?
Constructor Details
#initialize(data) ⇒ AccountSummary
Instance Methods
20 21 22 23 24 25 26 27 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 20 def initialize(data) self.username = data['username'] self.status = data['status'] self.id = data['id'] self.ratePlanExpirationDate = data['ratePlanExpirationDate'] self.chosenRatePlan = data['chosenRatePlan'] self.lastLoginTime = data['lastLoginTime'] end |
Instance Attribute Details
#chosenRatePlan ⇒ Object
Attributes
6 7 8 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 6 def chosenRatePlan @chosenRatePlan end |
#id ⇒ Object
Attributes
6 7 8 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 6 def id @id end |
#lastLoginTime ⇒ Object
Attributes
6 7 8 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 6 def lastLoginTime @lastLoginTime end |
#ratePlanExpirationDate ⇒ Object
Attributes
6 7 8 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 6 def ratePlanExpirationDate @ratePlanExpirationDate end |
#status ⇒ Object
Attributes
6 7 8 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 6 def status @status end |
#username ⇒ Object
Attributes
6 7 8 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 6 def username @username end |
Class Method Details
.getAccountSummaries ⇒ Object
Class Methods
9 10 11 12 13 14 15 16 |
# File 'lib/sorenson/threesixty/account_summary.rb', line 9 def self.getAccountSummaries data = post_to("/api/getAllAccounts") summaries = [] data['accounts'].each do |account| summaries << AccountSummary.new(account) end summaries end |