Breezex.Contributions (breezex v0.1.0) View Source

Module implementing the Breeze contributions API.

Link to this section Summary

Functions

Add a contribution record.

Contribution advanced search.

List the contributions by a person denoted by ID

Delete a contribution record by ID

Edit a contribution record. Requires a payment ID. Params are as in add/2

List the contributions for pledge campaigns

List funds

List funds with totals

List the contributions greater than or equal to a certain amount

List the contributions less than or equal to a certain amount

View a contribution record by ID

Link to this section Functions

Specs

Add a contribution record.

Valid keys for params map:

  • date -- Date or DateTime
  • person_id -- donor's Breeze ID. If unknown, use person or uid instead
  • person -- struct including at least name and email or street_adress to be matched against Breeze DB
  • uid -- unique ID provided by giving platform (which must be provided as processor)
  • processor -- name of payment processor. Needed if using uid
  • method -- payment method (check, cash, credit/debit online, credit/debit offline, donated goods, stock, direct deposit)
  • funds -- struct for how to split donation %{name: "", amount: 123, id: "123"}. ID is optional and will take precedence over name.
  • amount -- total donated. Must match total of what's in funds
  • group -- all contributions with matching group numbers will be a single batch, so should be unique per batch. Will auto-increment to the next batch in series.
  • batch_number -- batch number to import into
  • batch_name -- name of the batch. Can be paired with either batch_number or group
  • note -- optional note about contribution

Specs

add!(map(), map()) :: {map(), list()} | no_return()
Link to this function

advanced_search(config, params)

View Source

Specs

advanced_search(map(), map()) :: Breezex.Client.client_response()

Contribution advanced search.

Accepts a map of search filters. Available keys are:

  • start -- contributions on or after date, Date or DateTime object
  • end -- contributions on or before date, Date or DateTime object
  • person_id -- ID of person's contributions to fetch
  • include_family -- boolean. include family members of person_id. Ignored if no person_id provided.
  • min -- amount is greater than or equal
  • max -- amount is less than or equal
  • method_ids -- list of method IDs
  • fund_ids -- list of fund IDs
  • envelope -- envelope number
  • batches -- list of batch numbers
  • forms -- list of form IDs
  • pledge_ids -- list of pledge campaign IDs
Link to this function

advanced_search!(config, params)

View Source

Specs

advanced_search!(map(), map()) :: {map(), list()} | no_return()

Specs

List the contributions by a person denoted by ID

Specs

by_person!(map(), integer()) :: {map(), list()} | no_return()

Specs

Delete a contribution record by ID

Specs

delete!(map(), integer()) :: {map(), list()} | no_return()
Link to this function

edit(config, id, params)

View Source

Specs

Edit a contribution record. Requires a payment ID. Params are as in add/2

Link to this function

edit!(config, id, params)

View Source

Specs

edit!(map(), integer(), map()) :: {map(), list()} | no_return()
Link to this function

for_pledge_campaign(config, ids)

View Source

Specs

for_pledge_campaign(map(), [integer()]) :: Breezex.Client.client_response()

List the contributions for pledge campaigns

Link to this function

for_pledge_campaign!(config, ids)

View Source

Specs

for_pledge_campaign!(map(), [integer()]) :: {map(), list()} | no_return()

Specs

list_funds(map()) :: Breezex.Client.client_response()

List funds

Specs

list_funds!(map()) :: {map(), list()} | no_return()
Link to this function

list_funds_with_totals(config)

View Source

Specs

list_funds_with_totals(map()) :: Breezex.Client.client_response()

List funds with totals

Link to this function

list_funds_with_totals!(config)

View Source

Specs

list_funds_with_totals!(map()) :: {map(), list()} | no_return()
Link to this function

over_amount(config, amount)

View Source

Specs

over_amount(map(), integer()) :: Breezex.Client.client_response()

List the contributions greater than or equal to a certain amount

Link to this function

over_amount!(config, amount)

View Source

Specs

over_amount!(map(), integer()) :: {map(), list()} | no_return()
Link to this function

under_amount(config, amount)

View Source

Specs

under_amount(map(), integer()) :: Breezex.Client.client_response()

List the contributions less than or equal to a certain amount

Link to this function

under_amount!(config, amount)

View Source

Specs

under_amount!(map(), integer()) :: {map(), list()} | no_return()

Specs

View a contribution record by ID

Specs

view!(map(), integer()) :: {map(), list()} | no_return()