Advertisement
gidpoiiohika

class UserBuyRequest < ::Notifications::SlackServices::Base

Apr 21st, 2020
1,544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.55 KB | None | 0 0
  1. module Notifications
  2.   module SlackServices
  3.     class UserBuyRequest < ::Notifications::SlackServices::Base
  4.       def notify_text
  5.         "#{ENV['APP_NAME']}: New Payment #{user&.full_name}"
  6.       end
  7.  
  8.       def message
  9.         default_message_params[:fields].push({  title: 'Subscription Plan',
  10.                                                 value: user&.subscription_plan&.capitalize.gsub("_", " ").gsub(/\b./, &:upcase),
  11.                                                 short: true })
  12.         #default_message_params
  13.       end
  14.     end
  15.   end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement