SHARE
TWEET

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

gidpoiiohika Apr 21st, 2020 644 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top