Class: YandexKassa::Requests::Deposition
- Inherits:
-
Object
- Object
- YandexKassa::Requests::Deposition
- Defined in:
- lib/yandex_kassa/requests.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#agent_id ⇒ Object
Returns the value of attribute agent_id.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#client_order_id ⇒ Object
Returns the value of attribute client_order_id.
-
#contract ⇒ Object
Returns the value of attribute contract.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#dst_account ⇒ Object
Returns the value of attribute dst_account.
-
#request_dt ⇒ Object
Returns the value of attribute request_dt.
Instance Method Summary collapse
- #extra_params ⇒ Object
-
#initialize(params = {}, &block) ⇒ Deposition
constructor
A new instance of Deposition.
- #request_name ⇒ Object
- #request_path ⇒ Object
- #xml_request_body ⇒ Object
Constructor Details
#initialize(params = {}, &block) ⇒ Deposition
Returns a new instance of Deposition.
22 23 24 25 |
# File 'lib/yandex_kassa/requests.rb', line 22 def initialize(params = {}, &block) params.each { |method, value| instance_variable_set("@#{method}", value) } block.call(self) if block_given? end |
Instance Attribute Details
#agent_id ⇒ Object
Returns the value of attribute agent_id.
20 21 22 |
# File 'lib/yandex_kassa/requests.rb', line 20 def agent_id @agent_id end |
#amount ⇒ Object
Returns the value of attribute amount.
20 21 22 |
# File 'lib/yandex_kassa/requests.rb', line 20 def amount @amount end |
#client_order_id ⇒ Object
Returns the value of attribute client_order_id.
20 21 22 |
# File 'lib/yandex_kassa/requests.rb', line 20 def client_order_id @client_order_id end |
#contract ⇒ Object
Returns the value of attribute contract.
20 21 22 |
# File 'lib/yandex_kassa/requests.rb', line 20 def contract @contract end |
#currency ⇒ Object
Returns the value of attribute currency.
20 21 22 |
# File 'lib/yandex_kassa/requests.rb', line 20 def currency @currency end |
#dst_account ⇒ Object
Returns the value of attribute dst_account.
20 21 22 |
# File 'lib/yandex_kassa/requests.rb', line 20 def dst_account @dst_account end |
#request_dt ⇒ Object
Returns the value of attribute request_dt.
20 21 22 |
# File 'lib/yandex_kassa/requests.rb', line 20 def request_dt @request_dt end |
Instance Method Details
#extra_params ⇒ Object
31 |
# File 'lib/yandex_kassa/requests.rb', line 31 def extra_params; end |
#request_name ⇒ Object
27 |
# File 'lib/yandex_kassa/requests.rb', line 27 def request_name; end |
#request_path ⇒ Object
29 |
# File 'lib/yandex_kassa/requests.rb', line 29 def request_path; end |
#xml_request_body ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/yandex_kassa/requests.rb', line 33 def xml_request_body <<XML <?xml version="1.0" encoding="UTF-8"?> <#{request_name} agentId="#{agent_id}" clientOrderId="#{client_order_id}" requestDT="#{request_dt}" dstAccount="#{dst_account}" amount="#{amount}" currency="#{currency}" contract="#{contract}">#{extra_params} </#{request_name}> XML end |