-
Notifications
You must be signed in to change notification settings - Fork 217
Fix handler typo in billing alerts #1045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change
export const automatedPlanUpdateAlert = 'billing.automatedPlanUpdate'; |
}); | ||
}); | ||
|
||
describe('onAutomatedPlanUpdatePublished', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe('onAutomatedPlanUpdatePublished', () => { | |
describe('onPlanAutomatedUpdatePublished', () => { |
src/v2/providers/alerts/billing.ts
Outdated
export const planUpdateAlert = 'billing.planUpdate'; | ||
/** @internal */ | ||
export const automatedPlanUpdateAlert = 'billing.automatedPlanUpdate'; | ||
export const planAutomatedUpdateAlert = 'billing.automatedPlanUpdate'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh this is bit odd. The event type is still automatedPlanUpdate
not planAutomatedUpdate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just double checked the alert type string, it's set to billing.automatedPlanUpdate
. Since all their other methods and structures have this as planAutomatedUpdate, I'm going to request that they change this value on the provider end. I'll leave this PR up until it gets sorted out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's in the spec? IDK if we should differ between the alerttype and the handler function name. It just seemed odd that this isn't object -> verb naming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaces
onAutomatedPlanUpdatePublished()
with the correctonPlanAutomatedUpdatePublished()
in billing alerts.