Class: K2ConnectRuby::K2Entity::K2FinancialEntities::Reversals::ReversalRequest
- Inherits:
-
Object
- Object
- K2ConnectRuby::K2Entity::K2FinancialEntities::Reversals::ReversalRequest
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb
Overview
Request to initiate a reversal
Instance Attribute Summary collapse
-
#callback_url ⇒ Object
Returns the value of attribute callback_url.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#transaction_reference ⇒ Object
Returns the value of attribute transaction_reference.
Instance Method Summary collapse
- #endpoint ⇒ Object
-
#initialize(kwargs) ⇒ ReversalRequest
constructor
A new instance of ReversalRequest.
- #request_body ⇒ Object
Constructor Details
#initialize(kwargs) ⇒ ReversalRequest
Returns a new instance of ReversalRequest.
15 16 17 18 19 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb', line 15 def initialize(kwargs) kwargs.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#callback_url ⇒ Object
Returns the value of attribute callback_url.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb', line 11 def callback_url @callback_url end |
#metadata ⇒ Object
Returns the value of attribute metadata.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb', line 11 def @metadata end |
#reason ⇒ Object
Returns the value of attribute reason.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb', line 11 def reason @reason end |
#transaction_reference ⇒ Object
Returns the value of attribute transaction_reference.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb', line 11 def transaction_reference @transaction_reference end |
Instance Method Details
#endpoint ⇒ Object
32 33 34 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb', line 32 def endpoint K2ConnectRuby::K2Utilities::Config::K2Config.endpoint("reversals") end |
#request_body ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/reversals/reversal_request.rb', line 21 def request_body { transaction_reference: transaction_reference, reason: reason, metadata: , _links: { callback_url: callback_url } } end |