Class: PrintNode::Account
- Inherits:
-
Object
- Object
- PrintNode::Account
- Defined in:
- lib/printnode/account.rb
Instance Attribute Summary collapse
-
#creator_ref ⇒ Object
Returns the value of attribute creator_ref.
-
#email ⇒ Object
Returns the value of attribute email.
-
#firstname ⇒ Object
Returns the value of attribute firstname.
-
#lastname ⇒ Object
Returns the value of attribute lastname.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(firstname, lastname, email, password) ⇒ Account
constructor
A new instance of Account.
- #to_hash ⇒ Object
Constructor Details
#initialize(firstname, lastname, email, password) ⇒ Account
Returns a new instance of Account.
19 20 21 22 23 24 |
# File 'lib/printnode/account.rb', line 19 def initialize(firstname, lastname, email, password) @firstname = firstname @lastname = lastname @email = email @password = password end |
Instance Attribute Details
#creator_ref ⇒ Object
Returns the value of attribute creator_ref.
7 8 9 |
# File 'lib/printnode/account.rb', line 7 def creator_ref @creator_ref end |
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/printnode/account.rb', line 5 def email @email end |
#firstname ⇒ Object
Returns the value of attribute firstname.
3 4 5 |
# File 'lib/printnode/account.rb', line 3 def firstname @firstname end |
#lastname ⇒ Object
Returns the value of attribute lastname.
4 5 6 |
# File 'lib/printnode/account.rb', line 4 def lastname @lastname end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/printnode/account.rb', line 6 def password @password end |
Instance Method Details
#to_hash ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/printnode/account.rb', line 9 def to_hash hash = {} hash['firstname'] = @firstname hash['lastname'] = @lastname hash['email'] = @email hash['password'] = @password hash['creatorRef'] = @creator_ref if @creator_ref hash end |