Class: Squeegee::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/squeegee/account.rb

Overview

Account

Generic account with validations on specific parameters

Instance Attribute Summary collapse

Attributes inherited from Base

#agent, #keys

Instance Method Summary collapse

Methods inherited from Base

#get, #params

Constructor Details

#initialize(args = {}) ⇒ Account

Returns a new instance of Account.



7
8
9
10
11
12
13
14
# File 'lib/squeegee/account.rb', line 7

def initialize(args={})
  @keys = %w(name uid amount due_at)
  params(args)

  args.each do |attribute, value|
    send(:"#{attribute}=", value)
  end
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



6
7
8
# File 'lib/squeegee/account.rb', line 6

def amount
  @amount
end

#due_atObject

Returns the value of attribute due_at.



6
7
8
# File 'lib/squeegee/account.rb', line 6

def due_at
  @due_at
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/squeegee/account.rb', line 6

def name
  @name
end

#numberObject

Returns the value of attribute number.



6
7
8
# File 'lib/squeegee/account.rb', line 6

def number
  @number
end

Returns the value of attribute paid.



6
7
8
# File 'lib/squeegee/account.rb', line 6

def paid
  @paid
end

#uidObject

Returns the value of attribute uid.



6
7
8
# File 'lib/squeegee/account.rb', line 6

def uid
  @uid
end