Class: SiebelDonations::Designation
- Defined in:
- lib/siebel_donations/designation.rb
Instance Attribute Summary collapse
-
#chartfield ⇒ Object
readonly
Returns the value of attribute chartfield.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#staff_account_id ⇒ Object
readonly
Returns the value of attribute staff_account_id.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from SiebelDonations::Base
Instance Attribute Details
#chartfield ⇒ Object (readonly)
Returns the value of attribute chartfield.
4 5 6 |
# File 'lib/siebel_donations/designation.rb', line 4 def chartfield @chartfield end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/siebel_donations/designation.rb', line 4 def description @description end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
4 5 6 |
# File 'lib/siebel_donations/designation.rb', line 4 def number @number end |
#staff_account_id ⇒ Object (readonly)
Returns the value of attribute staff_account_id.
4 5 6 |
# File 'lib/siebel_donations/designation.rb', line 4 def staff_account_id @staff_account_id end |
Instance Method Details
#account_type ⇒ Object
6 7 8 |
# File 'lib/siebel_donations/designation.rb', line 6 def account_type @chartfield.present? ? 'Chartfield' : 'StaffAccount' end |
#balances(account_types = nil) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/siebel_donations/designation.rb', line 10 def balances(account_types = nil) if @account_type == 'Chartfield' raise 'Balance information is not currently available for chartfields' else Balance.find(employee_ids: @staff_account_id, staff_account_types: account_types || 'primary').first end end |