Module: JeraPayment::Concerns::ResourceCallbacks
- Extended by:
- ActiveSupport::Concern
- Included in:
- JeraPayment::Charge, JeraPayment::CreditCard, JeraPayment::Customer, Household, Invoice, Plan, SubAccount, Subscription, Transfer, Withdrawal
- Defined in:
- lib/jera_payment/models/concerns/resource_callbacks.rb
Instance Method Summary collapse
- #api_action(action_name) ⇒ Object
- #has_create_callback? ⇒ Boolean
- #has_destroy_callback? ⇒ Boolean
- #has_update_callback? ⇒ Boolean
Instance Method Details
#api_action(action_name) ⇒ Object
12 13 14 15 |
# File 'lib/jera_payment/models/concerns/resource_callbacks.rb', line 12 def api_action(action_name) api_response = eval("JeraPayment::Services::#{api_name}::#{module_name}::#{action_name.to_s.capitalize}.new(self).call") throw(:abort) unless api_response end |
#has_create_callback? ⇒ Boolean
21 22 23 |
# File 'lib/jera_payment/models/concerns/resource_callbacks.rb', line 21 def has_create_callback? true end |
#has_destroy_callback? ⇒ Boolean
25 26 27 |
# File 'lib/jera_payment/models/concerns/resource_callbacks.rb', line 25 def has_destroy_callback? true end |
#has_update_callback? ⇒ Boolean
17 18 19 |
# File 'lib/jera_payment/models/concerns/resource_callbacks.rb', line 17 def has_update_callback? true end |