Class: FaithTeams::API::V2::Entity::Fund

Inherits:
Base
  • Object
show all
Defined in:
lib/faithteams/api/v2/entity/fund.rb

Overview

Wraps a faithteams fund object.

Instance Method Summary collapse

Methods inherited from Base

#initialize, #saved?, #to_h

Constructor Details

This class inherits a constructor from FaithTeams::API::V2::Entity::Base

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/faithteams/api/v2/entity/fund.rb', line 50

def active?
  status == "A"
end

#defaultString?

Returns "N" for no, "Y" for yes.

Returns:

  • (String, nil)

    "N" for no, "Y" for yes



10
11
12
# File 'lib/faithteams/api/v2/entity/fund.rb', line 10

def default
  read_attribute(:isDefault).presence
end

#default?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/faithteams/api/v2/entity/fund.rb', line 15

def default?
  default == "Y"
end

#descriptionString?

Returns:

  • (String, nil)


20
21
22
# File 'lib/faithteams/api/v2/entity/fund.rb', line 20

def description
  read_attribute(:description).presence
end

#fund_idInteger?

Returns:

  • (Integer, nil)


25
26
27
# File 'lib/faithteams/api/v2/entity/fund.rb', line 25

def fund_id
  read_attribute(:fundId)
end

#nameString?

Returns:

  • (String, nil)


30
31
32
# File 'lib/faithteams/api/v2/entity/fund.rb', line 30

def name
  read_attribute(:name).presence
end

#online_statusString?

Returns "A" for active, "I" for inactive.

Returns:

  • (String, nil)

    "A" for active, "I" for inactive



35
36
37
# File 'lib/faithteams/api/v2/entity/fund.rb', line 35

def online_status
  read_attribute(:onlineStatus).presence
end

#org_idInteger?

Returns:

  • (Integer, nil)


40
41
42
# File 'lib/faithteams/api/v2/entity/fund.rb', line 40

def org_id
  read_attribute(:orgId)
end

#statusString?

Returns "A" for active, "I" for inactive.

Returns:

  • (String, nil)

    "A" for active, "I" for inactive



45
46
47
# File 'lib/faithteams/api/v2/entity/fund.rb', line 45

def status
  read_attribute(:status).presence
end

#tax_deductibleString?

Returns "T" for true?, "Y" for yes?.

Returns:

  • (String, nil)

    "T" for true?, "Y" for yes?



55
56
57
# File 'lib/faithteams/api/v2/entity/fund.rb', line 55

def tax_deductible
  read_attribute(:taxDeductible).presence
end