Class: YandexKassa::Requests::MakeDeposition

Inherits:
Deposition
  • Object
show all
Defined in:
lib/yandex_kassa/requests.rb

Instance Attribute Summary

Attributes inherited from Deposition

#agent_id, #amount, #client_order_id, #contract, #currency, #dst_account, #request_dt

Instance Method Summary collapse

Methods inherited from Deposition

#initialize, #xml_request_body

Constructor Details

This class inherits a constructor from YandexKassa::Requests::Deposition

Instance Method Details

#extra_paramsObject



67
68
69
# File 'lib/yandex_kassa/requests.rb', line 67

def extra_params
  @payment_params_body || set_payment_params
end

#payment_paramsObject



71
72
73
# File 'lib/yandex_kassa/requests.rb', line 71

def payment_params
  @payment_params ||= {}
end

#request_nameObject



59
60
61
# File 'lib/yandex_kassa/requests.rb', line 59

def request_name
  'makeDepositionRequest'
end

#request_pathObject



63
64
65
# File 'lib/yandex_kassa/requests.rb', line 63

def request_path
  'makeDeposition'
end

#set_payment_params(params = payment_params) ⇒ Object



75
76
77
78
# File 'lib/yandex_kassa/requests.rb', line 75

def set_payment_params(params = payment_params)
  params = params.inject("") { |str, hash| str + "<#{hash[0]}>#{hash[1]}</#{hash[0]}>\n"}
  @payment_params_body = "\n<paymentParams>\n#{params}</paymentParams>"
end