Hello,
I’d like to state some of my findings with the API.
- There are TIERS and GOALS and BENEFITS in the page creator. However, TIER is named as REWARD and BENEFITS are nowhere to be found in the API. Also, there’s no notion of continuous vs once-a-month (rewarded after processing the pledge every month) benefit. There’s just one-time vs monthly. It doesn’t help a bit. New endpoints like this would help:
GET /benefit/current_user Return all benefits to be applied to current user
POST /benefit/current_user/apply/1 Mark benefit=1 as applied
DELETE /benefit/current_user/apply/1 Mark as not-applied
- By looking at the returned PLEDGE object, it is not possible to understand whether the patron has made any payments or not. To actually understand a patron paid for the last month, I have to first check month(pledge.created_at) < month(now) and day_of_month(now) >= 2 and I don’t know how to process declined_since: Since you process at a random time on 1st of each month, if the patron declines today, and today is the first day of the month, how do I know whether this decline was not for the next month or last month? To solve this issue, you must return pledges for each month individually like:
Example 1:
[
{ amount: 1.00, status: 'processed', month: '2018-04' }, // pledge successful on April
{ amount: 0.00, status: 'deleted', month: '2018-05' }, // deleted on May
{ amount: 3.00, status: 'declined', month: '2018-07' }, // re-pledged on July with 3$ but declined
{ amount: 3.00, status: 'pending', month: '2018-08' } // waiting for the end of month
]
Example 2:
[
{ amount: 1.00, status: 'processed', month: '2018-06' }, // June is OK
{ amount: 2.00, status: 'pending', month: '2018-07' }, // increased pledge to 2$ last month, but still processing due to delays
{ amount: 2.00, status: 'paused', month: '2018-08' } // this month will be paused
]
- It is not possible to get optional parameters (like is_paused) on pledge objects while getting current user’s pledges with Java client.
Thanks