Class: Etapper::Account
Constant Summary
collapse
- DONOR_RECOGNITION_TYPES =
[
:donor_name,
:do_not_recognize,
:anonymous,
:recognition_name
]
- ACCOUNT_ROLE_TYPES =
[
:donor,
:tribute,
:user
]
Class Method Summary
collapse
Instance Method Summary
collapse
#==, #base, cname, etap_read_only, #initialize, #method_missing, #new?, #save
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Etapper::EtapAbstract
Class Method Details
.find(query) ⇒ Object
Returns an Account object retrieved from eTapestry using the supplied parameter.
The exact method used varies by the query parameter type:
- INTEGER: getAccountById()
- ACCOUNT REF (dot-separated number string): getAccount()
- E-MAIL ADDRESS: getDuplicateAccount
- HASH: getAccountRef() with defined value, then getAccount() (only the first hash value is used)
Instance Method Details
#accountDefinedValues ⇒ Object
#accountRoleType ⇒ Object
94
95
96
|
# File 'lib/etapper/classes/account.rb', line 94
def accountRoleType
ACCOUNT_ROLE_TYPES[@base.accountRoleType]
end
|
#accountRoleType=(val) ⇒ Object
98
99
100
|
# File 'lib/etapper/classes/account.rb', line 98
def accountRoleType=(val)
@base.accountRoleType = ACCOUNT_ROLE_TYPES.index(val)
end
|
Retrieves all Contact journal entries for the account.
108
109
110
|
# File 'lib/etapper/classes/account.rb', line 108
def contacts
@contacts ||= Contact.findByAccount(self)
end
|
#definedValues ⇒ Object
82
83
84
|
# File 'lib/etapper/classes/account.rb', line 82
def definedValues
@definedValues = accountDefinedValues.merge(personaDefinedValues).freeze
end
|
#donorRecognitionType ⇒ Object
86
87
88
|
# File 'lib/etapper/classes/account.rb', line 86
def donorRecognitionType
DONOR_RECOGNITION_TYPES[@base.donorRecognitionType]
end
|
#donorRecognitionType=(val) ⇒ Object
90
91
92
|
# File 'lib/etapper/classes/account.rb', line 90
def donorRecognitionType=(val)
@base.donorRecognitionType = DONOR_RECOGNITION_TYPES.index(val)
end
|
#fax ⇒ Object
64
65
66
|
# File 'lib/etapper/classes/account.rb', line 64
def fax
phones[:fax]
end
|
#fax=(val) ⇒ Object
68
69
70
|
# File 'lib/etapper/classes/account.rb', line 68
def fax=(val)
phones[:fax] = val
end
|
#gifts ⇒ Object
Retrieves all Gift journal entries for the account.
103
104
105
|
# File 'lib/etapper/classes/account.rb', line 103
def gifts
@gifts ||= Gift.findByAccount(self)
end
|
#id ⇒ Object
Return the eTapestry account ID
113
114
115
|
# File 'lib/etapper/classes/account.rb', line 113
def id
base.id
end
|
#personaDefinedValues ⇒ Object
#phone ⇒ Object
56
57
58
|
# File 'lib/etapper/classes/account.rb', line 56
def phone
phones[:voice] || phones[:business] || phones[:mobile] || phones[:home]
end
|
#phone=(val) ⇒ Object
60
61
62
|
# File 'lib/etapper/classes/account.rb', line 60
def phone=(val)
phones[:voice] = val
end
|