Class: Reve::Classes::AccountStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/reve/classes.rb

Overview

Represents a AccountStatus for Reve::API#account_status Attributes

  • user_id ( Fixnum ) - The account’s userID

  • paid_until ( Time ) - DateTime until when the account is still active.

  • created_at ( Time ) - DateTime when the account was created.

  • logon_count ( Fixnum ) - The amount of times the User logged in.

  • logon_minutes ( Fixnum ) - The amount of minutes the user was logged in.

GTC buy offers not yet inplemented

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elem) ⇒ AccountStatus

:nodoc:



1606
1607
1608
1609
1610
1611
1612
# File 'lib/reve/classes.rb', line 1606

def initialize(elem) #:nodoc:
  @user_id = (elem/'userID').inner_html.to_i
  @paid_until = Time.parse((elem/'paidUntil').inner_html)
  @created_at = Time.parse((elem/'createDate').inner_html)
  @logon_count = (elem/'logonCount').inner_html.to_i
  @logon_minutes = (elem/'logonMinutes').inner_html.to_i
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



1605
1606
1607
# File 'lib/reve/classes.rb', line 1605

def created_at
  @created_at
end

#logon_countObject (readonly)

Returns the value of attribute logon_count.



1605
1606
1607
# File 'lib/reve/classes.rb', line 1605

def logon_count
  @logon_count
end

#logon_minutesObject (readonly)

Returns the value of attribute logon_minutes.



1605
1606
1607
# File 'lib/reve/classes.rb', line 1605

def logon_minutes
  @logon_minutes
end

Returns the value of attribute paid_until.



1605
1606
1607
# File 'lib/reve/classes.rb', line 1605

def paid_until
  @paid_until
end

#user_idObject (readonly)

Returns the value of attribute user_id.



1605
1606
1607
# File 'lib/reve/classes.rb', line 1605

def user_id
  @user_id
end