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
Email to developer on plan change performed via API #709
Email to developer on plan change performed via API #709
Conversation
26fc943
to
00e7b28
Compare
Codecov Report
@@ Coverage Diff @@
## master #709 +/- ##
==========================================
- Coverage 92.84% 92.84% -0.01%
==========================================
Files 2387 2387
Lines 77516 77523 +7
==========================================
+ Hits 71967 71973 +6
- Misses 5549 5550 +1
Continue to review full report at Codecov.
|
4c61691
to
e6229c3
Compare
ffddb4d
to
5643347
Compare
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.
I like this new version 👍 Good job! 🥇
app/mailers/notification_mailer.rb
Outdated
@@ -1,4 +1,7 @@ | |||
class NotificationMailer < ActionMailer::Base | |||
include CMS::EmailTemplate::MailerExtension |
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.
So this class is only for Provider
Provider users can choose which notification they get in their notification preferences
Developers do not really have this option.
@macejmic can we have a way to use subscribe_for_notification
in another class?
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.
not really, we would need to create the same logic for developers.
b444f6d
to
c2c1a74
Compare
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.
LGTM 👍 And I appreciate the tests to understand a bit of what's going on 😄 but I definitely don't know enough about this notifications/emails logic so it would be good if @hallelujah and @macejmic can review too 😄
|
||
def notify_plan_change_developer(contract) | ||
return unless contract.is_a? Cinstance | ||
contract.messenger.plan_change_for_buyer(contract).deliver |
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.
Might be good to use asynchronous mailing.
But I think it is OK for now as it was like that in the controller anyway.
c2c1a74
to
2d83ee7
Compare
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.
LGTM 👍
What this PR does / why we need it
This PR makes application plan changes performed by the provider through the API to send a notification message to the buyer as well, as it does when performed in the Admin Portal.
Which issue(s) this PR fixes
Closes THREESCALE-923.