Class: JeraPayment::Withdrawal

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
Enumerize
Includes:
Concerns::ResourceCallbacks, Concerns::WithdrawalMethods
Defined in:
lib/jera_payment/models/withdrawal.rb

Instance Method Summary collapse

Methods included from Concerns::ResourceCallbacks

#api_action, #has_create_callback?, #has_destroy_callback?, #has_update_callback?

Instance Method Details

#custom_variablesObject



20
21
22
# File 'lib/jera_payment/models/withdrawal.rb', line 20

def custom_variables
  ActiveSupport::JSON.decode(self[:custom_variables]).map{ |item| item.deep_symbolize_keys } if self[:custom_variables]
end

#custom_variables=(value) ⇒ Object



16
17
18
# File 'lib/jera_payment/models/withdrawal.rb', line 16

def custom_variables=(value)
  write_attribute(:custom_variables, value&.to_json)
end