Closed dgalarza closed 2 years ago
Hi @dgalarza thanks for the PR!!
I was reviewing the diff and the first thing that stood out to me was the difference between the delete_campaign_trigger_schedule
added here and the existing trigger_campaign_send
and trigger_campaign_schedule
methods. The pattern seems to be to init a BrazeRuby::REST::Base
subclass and then call perform on it.
There are three subclasses of BrazeRuby::REST::Base
for each of these methods:
BrazeRuby::REST::DeleteTriggerCampaignSchedule
- added hereBrazeRuby::REST::TriggerCampaignSend
- existingBrazeRuby::REST::TriggerCampaignSchedule
- existingAnd they don't all behave the same way - the first sends the payload when calling perform
and the remaining two send it when making the instance. My immediate thought was: is this consistent elsewhere?
So then I cruised through the other BrazeRuby::REST::Base
subclasses and wow it is NOT consistent. 😢
Anyway, this PR should not have the responsibility of making these subclasses consistent so I'm happy to merge and move on with my life but I wanted to note this because it makes my anxiety more public, haha.
Haha @jonallured no problem at all! Not gonna lie, I was trying to figure out which convention to follow and ended up picking one. Figured it could always be changed if there is a desired one to move forward with.
Thanks!
https://www.braze.com/docs/api/endpoints/messaging/schedule_messages/post_delete_scheduled_triggered_messages/