Class: K2ConnectRuby::K2Entity::K2FinancialEntities::SendMoney::SendMoneyRequest
- Inherits:
-
Object
- Object
- K2ConnectRuby::K2Entity::K2FinancialEntities::SendMoney::SendMoneyRequest
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb
Instance Attribute Summary collapse
-
#callback_url ⇒ Object
Returns the value of attribute callback_url.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#destination_requests ⇒ Object
Returns the value of attribute destination_requests.
-
#destinations ⇒ Object
Returns the value of attribute destinations.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#source_identifier ⇒ Object
Returns the value of attribute source_identifier.
Instance Method Summary collapse
- #endpoint ⇒ Object
-
#initialize(kwargs) ⇒ SendMoneyRequest
constructor
A new instance of SendMoneyRequest.
- #request_body ⇒ Object
Constructor Details
#initialize(kwargs) ⇒ SendMoneyRequest
Returns a new instance of SendMoneyRequest.
16 17 18 19 20 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 16 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.
10 11 12 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 10 def callback_url @callback_url end |
#currency ⇒ Object
Returns the value of attribute currency.
10 11 12 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 10 def currency @currency end |
#destination_requests ⇒ Object
Returns the value of attribute destination_requests.
10 11 12 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 10 def destination_requests @destination_requests end |
#destinations ⇒ Object
Returns the value of attribute destinations.
10 11 12 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 10 def destinations @destinations end |
#metadata ⇒ Object
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 10 def @metadata end |
#source_identifier ⇒ Object
Returns the value of attribute source_identifier.
10 11 12 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 10 def source_identifier @source_identifier end |
Instance Method Details
#endpoint ⇒ Object
22 23 24 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 22 def endpoint K2ConnectRuby::K2Utilities::Config::K2Config.endpoint("send_money") end |
#request_body ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/k2-connect-ruby/k2_entity/k2_financial_entities/send_money/send_money_request.rb', line 26 def request_body { source_identifier: source_identifier, destinations: destination_requests&.map(&:destination_payload), currency: currency, metadata: , _links: { callback_url: callback_url, }, } end |