class PrintNode::Account

An object to deal with Account Creation. @author Jake Torrance @author PrintNode

Attributes

creator_ref[RW]
email[RW]
firstname[RW]
lastname[RW]
password[RW]

Public Class Methods

new(firstname, lastname, email, password) click to toggle source

Initialize our object ready for being mapped into a hash.

# File lib/printnode/account.rb, line 24
def initialize(firstname, lastname, email, password)
  @firstname = firstname
  @lastname = lastname
  @email = email
  @password = password
end

Public Instance Methods

to_hash() click to toggle source

Map our object into a hash for JSON Encoding.

# File lib/printnode/account.rb, line 13
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