class JeraPayment::Generators::InstallGenerator
Public Instance Methods
callback_services()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 26 def callback_services copy_subscription_files copy_invoice_files copy_sub_account_files copy_withdrawal_files end
generate_migrations()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 17 def generate_migrations case self.behavior when :invoke generate "active_record:jera_payment", "migration" when :revoke Rails::Generators.invoke "active_record:jera_payment", ["migration"], behavior: :revoke end end
initializer_file()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 9 def initializer_file template 'jera_payment.rb', 'config/initializers/jera_payment.rb' end
locale_file()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 13 def locale_file copy_file '../../../../config/locale/jera_payment.pt-BR.yml', 'config/locales/jera_payment.pt-BR.yml' end
Private Instance Methods
copy_invoice_files()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 42 def copy_invoice_files files = ['base', 'created', 'due', 'dunning_action', 'installment_released', 'payment_failed', 'refund', 'released', 'status_changed'] files.each do |file| copy_file "../../../jera_payment/services/iugu/handle_callbacks/invoice/#{file}.rb", "app/services/iugu/handle_callbacks/invoice/#{file}.rb" end end
copy_sub_account_files()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 50 def copy_sub_account_files files = ['base', 'verification', 'bank_verification'] files.each do |file| copy_file "../../../jera_payment/services/iugu/handle_callbacks/referrals/#{file}.rb", "app/services/iugu/handle_callbacks/referrals/#{file}.rb" end end
copy_subscription_files()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 34 def copy_subscription_files files = ['base', 'activated', 'changed', 'created', 'expired', 'renewed', 'suspended'] files.each do |file| copy_file "../../../jera_payment/services/iugu/handle_callbacks/subscription/#{file}.rb", "app/services/iugu/handle_callbacks/subscription/#{file}.rb" end end
copy_withdrawal_files()
click to toggle source
# File lib/generators/jera_payment/install_generator.rb, line 58 def copy_withdrawal_files files = ['base', 'created', 'status_changed'] files.each do |file| copy_file "../../../jera_payment/services/iugu/handle_callbacks/withdraw_request/#{file}.rb", "app/services/iugu/handle_callbacks/withdraw_request/#{file}.rb" end end