Class: FaithTeams::API::V2::Entity::ContributionType
- Inherits:
-
Base
- Object
- Base
- FaithTeams::API::V2::Entity::ContributionType
show all
- Defined in:
- lib/faithteams/api/v2/entity/contribution_type.rb
Overview
Wraps a faithteams contribution type object.
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #saved?, #to_h
Instance Method Details
#active? ⇒ Boolean
30
31
32
|
# File 'lib/faithteams/api/v2/entity/contribution_type.rb', line 30
def active?
(status || "I").strip.upcase == "A"
end
|
#id ⇒ Integer?
10
11
12
|
# File 'lib/faithteams/api/v2/entity/contribution_type.rb', line 10
def id
read_attribute(:contributionTypeId)
end
|
#name ⇒ String?
15
16
17
|
# File 'lib/faithteams/api/v2/entity/contribution_type.rb', line 15
def name
read_attribute(:name).presence
end
|
#status ⇒ String?
Returns "A" for active, "I" for inactive.
20
21
22
|
# File 'lib/faithteams/api/v2/entity/contribution_type.rb', line 20
def status
read_attribute(:status).presence
end
|
#tithely? ⇒ Boolean
25
26
27
|
# File 'lib/faithteams/api/v2/entity/contribution_type.rb', line 25
def tithely?
(name || "").strip.downcase == "tithely"
end
|