Class: Heroku::Model::Account

Inherits:
Struct
  • Object
show all
Includes:
API::Password, API::RateLimits, ModelHelper
Defined in:
lib/heroku/model/account.rb

Constant Summary

Constants included from API::RateLimits

API::RateLimits::RESOURCE_TYPE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API::RateLimits

#rate_limits

Methods included from API::Password

#update_password

Methods included from ModelHelper

#identifier, #struct_init_from_hash, #sub_struct_as_hash

Constructor Details

#initialize(params = {}) ⇒ Account

Returns a new instance of Account.



27
28
29
# File 'lib/heroku/model/account.rb', line 27

def initialize(params = {})
  super(*struct_init_from_hash(params))
end

Instance Attribute Details

#allow_trackingObject

Returns the value of attribute allow_tracking

Returns:

  • (Object)

    the current value of allow_tracking



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def allow_tracking
  @allow_tracking
end

#betaObject

Returns the value of attribute beta

Returns:

  • (Object)

    the current value of beta



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def beta
  @beta
end

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def created_at
  @created_at
end

#emailObject

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def email
  @email
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def id
  @id
end

#last_loginObject

Returns the value of attribute last_login

Returns:

  • (Object)

    the current value of last_login



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def 
  
end

#parentObject

Returns the value of attribute parent

Returns:

  • (Object)

    the current value of parent



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def parent
  @parent
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def updated_at
  @updated_at
end

#verifiedObject

Returns the value of attribute verified

Returns:

  • (Object)

    the current value of verified



7
8
9
# File 'lib/heroku/model/account.rb', line 7

def verified
  @verified
end

Instance Method Details

#identifiableObject



35
36
37
# File 'lib/heroku/model/account.rb', line 35

def identifiable
  sub_struct_as_hash(:id, :email)
end

#inspectObject



23
24
25
# File 'lib/heroku/model/account.rb', line 23

def inspect
  "#<#{self.class.name} #{identifier}>"
end

#patchableObject



31
32
33
# File 'lib/heroku/model/account.rb', line 31

def patchable
  sub_struct_as_hash(:email, :allow_tracking)
end

#saveObject



39
40
41
# File 'lib/heroku/model/account.rb', line 39

def save
  parent.(self)
end